Commit de71dbb2 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Make sure to set the minimum size before allocating string table

memory.
parent c63b85b8
...@@ -75,14 +75,14 @@ string_table *msi_init_stringtable( int entries, UINT codepage ) ...@@ -75,14 +75,14 @@ string_table *msi_init_stringtable( int entries, UINT codepage )
st = msi_alloc( sizeof (string_table) ); st = msi_alloc( sizeof (string_table) );
if( !st ) if( !st )
return NULL; return NULL;
if( entries < 1 )
entries = 1;
st->strings = msi_alloc_zero( sizeof (msistring) * entries ); st->strings = msi_alloc_zero( sizeof (msistring) * entries );
if( !st ) if( !st )
{ {
msi_free( st ); msi_free( st );
return NULL; return NULL;
} }
if( entries < 1 )
entries = 1;
st->maxcount = entries; st->maxcount = entries;
st->freeslot = 1; st->freeslot = 1;
st->codepage = codepage; st->codepage = codepage;
......
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