Resent: More sanity check in TOOLBAR_AddString

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changelog:
	dlls/comctl32/toolbar.c: TOOLBAR_AddString
	More checks before accessing lParam as string


-- 
Uwe Bonnes                bon@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: wine/dlls/comctl32/toolbar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/toolbar.c,v
retrieving revision 1.130
diff -u -r1.130 toolbar.c
--- wine/dlls/comctl32/toolbar.c	2 Apr 2003 23:19:45 -0000	1.130
+++ wine/dlls/comctl32/toolbar.c	3 May 2003 11:26:42 -0000
@@ -2530,7 +2530,7 @@
 	LPSTR p = (LPSTR)lParam;
 	INT len;
 
-	if (p == NULL)
+	if ((HIWORD(lParam) == 0) ||(p == NULL))
 	    return -1;
 	TRACE("adding string(s) from array!\n");
 
@@ -2641,7 +2641,7 @@
 	LPWSTR p = (LPWSTR)lParam;
 	INT len;
 
-	if (p == NULL)
+	if ((HIWORD(lParam) == 0) ||(p == NULL))
 	    return -1;
 	TRACE("adding string(s) from array!\n");
 	nIndex = infoPtr->nNumStrings;


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux