wine-staging/patches/comctl32-Tests/0001-comctl32-tests-Prevent-a-possible-nullpointer-derefe.patch

29 lines
1.4 KiB
Diff

From d18171f54de2c85d345a76586bd4672929cdbdb3 Mon Sep 17 00:00:00 2001
From: Mark Jansen <learn0more+wine@gmail.com>
Date: Sun, 11 Jun 2017 12:58:28 +0200
Subject: comctl32/tests: Prevent a possible nullpointer dereference.
---
dlls/comctl32/tests/imagelist.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c
index 20be1ea02f2..0978b3d69d3 100644
--- a/dlls/comctl32/tests/imagelist.c
+++ b/dlls/comctl32/tests/imagelist.c
@@ -2042,9 +2042,9 @@ static void check_color_table(const char *name, HDC hdc, HIMAGELIST himl, UINT i
ok((bmi->bmiColors[i].rgbRed == expect[i].rgbRed &&
bmi->bmiColors[i].rgbGreen == expect[i].rgbGreen &&
bmi->bmiColors[i].rgbBlue == expect[i].rgbBlue) ||
- broken(bmi->bmiColors[i].rgbRed == broken_expect[i].rgbRed &&
+ (broken_expect && broken(bmi->bmiColors[i].rgbRed == broken_expect[i].rgbRed &&
bmi->bmiColors[i].rgbGreen == broken_expect[i].rgbGreen &&
- bmi->bmiColors[i].rgbBlue == broken_expect[i].rgbBlue),
+ bmi->bmiColors[i].rgbBlue == broken_expect[i].rgbBlue)),
"%d: %s: got color[%d] %02x %02x %02x expect %02x %02x %02x\n", depth, name, i,
bmi->bmiColors[i].rgbRed, bmi->bmiColors[i].rgbGreen, bmi->bmiColors[i].rgbBlue,
expect[i].rgbRed, expect[i].rgbGreen, expect[i].rgbBlue);
--
2.13.1