The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / wine / 0001-Prevent-call-to-memset-with-a-null-pointer.patch
1 commit deb274226783ab886bdb44876944e156757efe2b
2 Author: Daniel Beitler <dan@dablabs.com>
3 Date:   Sun May 18 13:27:42 2014 -0400
4
5     msi: Prevent call to memset with a null pointer
6          in get_tablecolumns function.
7
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
11 anyway.
12
13 Backported from: deb274226783ab886bdb44876944e156757efe2b
14 Signed-off-by: AndrĂ© Hentschel <nerv@dawncrow.de>
15 ---
16  dlls/msi/table.c | 4 ++--
17  1 file changed, 2 insertions(+), 2 deletions(-)
18
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 */
25  
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++)
31      {
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)
35              {
36 -                ERR("column %d out of range\n", col);
37 +                ERR("column %d out of range (maxcount: %d)\n", col, maxcount);
38                  continue;
39              }
40              /* check if this column was already set */