Gabriel Ivăncescu : user32/listbox: Check for out of bounds using the index when painting the item.
Module: wine Branch: master Commit: ea185314b37a59640f59a9dd3321205fc53068a1 URL: https://source.winehq.org/git/wine.git/?a=commit;h=ea185314b37a59640f59a9dd3... Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Fri Feb 8 13:17:18 2019 +0200 user32/listbox: Check for out of bounds using the index when painting the item. Needed for LBS_NODATA. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/listbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index 594c956..821da60 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -533,7 +533,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 );
participants (1)
-
Alexandre Julliard