mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 13:10:28 +00:00
msi: Prevent call to memset with a null pointer in get_tablecolumns function.
This commit is contained in:
parent
0fe183c299
commit
deb2742267
@ -671,7 +671,7 @@ static UINT get_tablecolumns( MSIDATABASE *db, LPCWSTR szTableName, MSICOLUMNINF
|
||||
/* Note: _Columns table doesn't have non-persistent data */
|
||||
|
||||
/* if maxcount is non-zero, assume it's exactly right for this table */
|
||||
memset( colinfo, 0, maxcount * sizeof(*colinfo) );
|
||||
if (colinfo) memset( colinfo, 0, maxcount * sizeof(*colinfo) );
|
||||
count = table->row_count;
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
@ -684,7 +684,7 @@ static UINT get_tablecolumns( MSIDATABASE *db, LPCWSTR szTableName, MSICOLUMNINF
|
||||
/* check the column number is in range */
|
||||
if (col < 1 || col > maxcount)
|
||||
{
|
||||
ERR("column %d out of range\n", col);
|
||||
ERR("column %d out of range (maxcount: %d)\n", col, maxcount);
|
||||
continue;
|
||||
}
|
||||
/* check if this column was already set */
|
||||
|
Loading…
Reference in New Issue
Block a user