Mark Jansen : comctl32/tests: Prevent a possible nullptr dereference.

Alexandre Julliard julliard at winehq.org
Mon Mar 19 18:32:49 CDT 2018


Module: wine
Branch: master
Commit: f94d0e7b3aa9cb9af17e7c36212d95f20fbbce54
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f94d0e7b3aa9cb9af17e7c36212d95f20fbbce54

Author: Mark Jansen <mark.jansen at reactos.org>
Date:   Fri Mar 16 22:57:15 2018 +0100

comctl32/tests: Prevent a possible nullptr dereference.

Signed-off-by: Mark Jansen <mark.jansen at reactos.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 3838563..1c307e4 100644
--- a/dlls/comctl32/tests/imagelist.c
+++ b/dlls/comctl32/tests/imagelist.c
@@ -2047,9 +2047,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);




More information about the wine-cvs mailing list