msi: Fix heap overflow in save_string_table.

Fix heap overflow caused by not accounting for the dummy first item,
which contains the codepage.
This commit is contained in:
Robert Shearman 2006-02-22 16:30:50 +00:00 committed by Alexandre Julliard
parent 6c529a7273
commit 66c9cbbe0f
1 changed files with 1 additions and 1 deletions

View File

@ -755,7 +755,7 @@ static UINT save_string_table( MSIDATABASE *db )
/* construct the new table in memory first */
datasize = msi_string_totalsize( db->strings, &count );
poolsize = count*2*sizeof(USHORT);
poolsize = (count + 1)*2*sizeof(USHORT);
pool = msi_alloc( poolsize );
if( ! pool )