1 commit deb274226783ab886bdb44876944e156757efe2b
2 Author: Daniel Beitler <dan@dablabs.com>
3 Date: Sun May 18 13:27:42 2014 -0400
5 msi: Prevent call to memset with a null pointer
6 in get_tablecolumns function.
8 Fix miscompilation with gcc >= 4.9
9 See https://bugs.winehq.org/show_bug.cgi?id=36139 for the upstream
10 bug report. There won't be a Wine 1.6.3 so we need to address this
13 Backported from: deb274226783ab886bdb44876944e156757efe2b
14 Signed-off-by: André Hentschel <nerv@dawncrow.de>
16 dlls/msi/table.c | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
19 diff --git a/dlls/msi/table.c b/dlls/msi/table.c
20 index 8012369..9ed9421 100644
21 --- a/dlls/msi/table.c
22 +++ b/dlls/msi/table.c
23 @@ -671,7 +671,7 @@ static UINT get_tablecolumns( MSIDATABASE *db, LPCWSTR szTableName, MSICOLUMNINF
24 /* Note: _Columns table doesn't have non-persistent data */
26 /* if maxcount is non-zero, assume it's exactly right for this table */
27 - memset( colinfo, 0, maxcount * sizeof(*colinfo) );
28 + if (colinfo) memset( colinfo, 0, maxcount * sizeof(*colinfo) );
29 count = table->row_count;
30 for (i = 0; i < count; i++)
32 @@ -684,7 +684,7 @@ static UINT get_tablecolumns( MSIDATABASE *db, LPCWSTR szTableName, MSICOLUMNINF
33 /* check the column number is in range */
34 if (col < 1 || col > maxcount)
36 - ERR("column %d out of range\n", col);
37 + ERR("column %d out of range (maxcount: %d)\n", col, maxcount);
40 /* check if this column was already set */