Commit cece771b authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

webservices: Correctly grow buffer size in receive_message.

parent 9ef108ad
...@@ -502,7 +502,7 @@ static HRESULT receive_message( struct channel *channel, ULONG max_len, char **r ...@@ -502,7 +502,7 @@ static HRESULT receive_message( struct channel *channel, ULONG max_len, char **r
if (*ret_len + len > size) if (*ret_len + len > size)
{ {
char *tmp; char *tmp;
DWORD new_size = max( len, size * 2 ); DWORD new_size = max( *ret_len + len, size * 2 );
if (!(tmp = heap_realloc( buf, new_size ))) if (!(tmp = heap_realloc( buf, new_size )))
{ {
heap_free( buf ); heap_free( buf );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment