Commit 3c5ef7c4 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wbemprox: Make sure to allocate sufficient memory in resize_table.

parent 287d419e
......@@ -1018,10 +1018,10 @@ static BOOL resize_table( struct table *table, UINT row_count, UINT row_size )
table->num_rows_allocated = row_count;
return TRUE;
}
if (row_count >= table->num_rows_allocated)
if (row_count > table->num_rows_allocated)
{
BYTE *data;
UINT count = table->num_rows_allocated * 2;
UINT count = max( row_count, table->num_rows_allocated * 2 );
if (!(data = heap_realloc( table->data, count * row_size ))) return FALSE;
table->data = data;
table->num_rows_allocated = count;
......
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