mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 18:33:37 +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 a new issue