wine/dlls/comctl32 header.c

Alexandre Julliard julliard at wine.codeweavers.com
Thu Nov 17 05:06:18 CST 2005


ChangeSet ID:	21311
CVSROOT:	/opt/cvs-commit
Module name:	wine
Changes by:	julliard at winehq.org	2005/11/17 05:06:18

Modified files:
	dlls/comctl32  : header.c 

Log message:
	Vitaliy Margolen <wine-patch at kievinfo.com>
	Return false if index is out of bounds in GetItemT.

Patch: http://cvs.winehq.org/patch.py?id=21311

Old revision  New revision  Changes     Path
 1.88          1.89          +3 -4       wine/dlls/comctl32/header.c

Index: wine/dlls/comctl32/header.c
diff -u -p wine/dlls/comctl32/header.c:1.88 wine/dlls/comctl32/header.c:1.89
--- wine/dlls/comctl32/header.c:1.88	17 Nov 2005 11: 6:18 -0000
+++ wine/dlls/comctl32/header.c	17 Nov 2005 11: 6:18 -0000
@@ -813,11 +813,10 @@ HEADER_GetItemT (HWND hwnd, INT nItem, L
 
     if (phdi->mask == 0)
 	return TRUE;
-
     if ((nItem < 0) || (nItem >= (INT)infoPtr->uNumItem))
-        lpItem = NULL;
-    else
-        lpItem = &infoPtr->items[nItem];
+        return FALSE;
+
+    lpItem = &infoPtr->items[nItem];
 
     if (phdi->mask & HDI_BITMAP)
 	phdi->hbm = (lpItem != NULL) ? lpItem->hbm : 0;



More information about the wine-cvs mailing list