Make sure to set the minimum size before allocating string table
memory.
This commit is contained in:
parent
c63b85b866
commit
de71dbb2d8
|
@ -75,14 +75,14 @@ string_table *msi_init_stringtable( int entries, UINT codepage )
|
|||
st = msi_alloc( sizeof (string_table) );
|
||||
if( !st )
|
||||
return NULL;
|
||||
if( entries < 1 )
|
||||
entries = 1;
|
||||
st->strings = msi_alloc_zero( sizeof (msistring) * entries );
|
||||
if( !st )
|
||||
{
|
||||
msi_free( st );
|
||||
return NULL;
|
||||
}
|
||||
if( entries < 1 )
|
||||
entries = 1;
|
||||
st->maxcount = entries;
|
||||
st->freeslot = 1;
|
||||
st->codepage = codepage;
|
||||
|
|
Loading…
Reference in New Issue