Author: tfaber
Date: Mon Feb 9 19:04:42 2015
New Revision: 66210
URL:
http://svn.reactos.org/svn/reactos?rev=66210&view=rev
Log:
[USER32]
- In ICO_ExtractIconExW, don't try to return two icons if only one was requested.
Fixes stack corruption.
CORE-9142 #resolve
Modified:
trunk/reactos/win32ss/user/user32/misc/exticon.c
Modified: trunk/reactos/win32ss/user/user32/misc/exticon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/misc/e…
==============================================================================
--- trunk/reactos/win32ss/user/user32/misc/exticon.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/misc/exticon.c [iso-8859-1] Mon Feb 9 19:04:42
2015
@@ -52,7 +52,7 @@
BOOL bIcon,
DWORD fuLoad,
POINT *ptHotSpot);
-#endif
+#endif
/**********************************************************************
* find_entry_by_id
@@ -380,7 +380,7 @@
INT cx[2] = {cx1, cx2}, cy[2] = {cy1, cy2};
INT index;
- for(index = 0; index < 2; index++)
+ for(index = 0; index < (cx2 || cy2 ? 2 : 1); index++)
{
DWORD dataOffset;
LPBYTE imageData;