=?UTF-8?Q?Gabriel=20Iv=C4=83ncescu=20?=: comctl32/listbox: Check for out of bounds using the index when painting the item.
Alexandre Julliard
julliard at winehq.org
Thu Feb 7 16:20:56 CST 2019
Module: wine
Branch: master
Commit: 98ece04660ca1e0640143e20b0b0c71b3c970718
URL: https://source.winehq.org/git/wine.git/?a=commit;h=98ece04660ca1e0640143e20b0b0c71b3c970718
Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date: Thu Feb 7 15:12:20 2019 +0200
comctl32/listbox: Check for out of bounds using the index when painting the item.
Needed for LBS_NODATA.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/listbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c
index cb645b4..9e6d8ea 100644
--- a/dlls/comctl32/listbox.c
+++ b/dlls/comctl32/listbox.c
@@ -508,7 +508,7 @@ static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect,
RECT r;
HRGN hrgn;
- if (!item)
+ if (index >= descr->nb_items)
{
if (action == ODA_FOCUS)
DrawFocusRect( hdc, rect );
More information about the wine-cvs
mailing list