Commit in reactos/lib/user32/windows on MAIN
bitmap.c+5-31.32 -> 1.33
icon.c+2-21.22 -> 1.23
+7-5
2 modified files
Do some simple error checking on .cur and .ico file structure

reactos/lib/user32/windows
bitmap.c 1.32 -> 1.33
diff -u -r1.32 -r1.33
--- bitmap.c	15 Aug 2004 21:36:28 -0000	1.32
+++ bitmap.c	5 Oct 2004 22:08:56 -0000	1.33
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: bitmap.c,v 1.32 2004/08/15 21:36:28 chorns Exp $
+/* $Id: bitmap.c,v 1.33 2004/10/05 22:08:56 gvg Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/input.c
@@ -180,7 +180,8 @@
 
       IconDIR = MapViewOfFile(hSection, FILE_MAP_READ, 0, 0, 0);
       CloseHandle(hSection);
-      if (IconDIR == NULL)
+      if (IconDIR == NULL || 0 != IconDIR->idReserved
+          || (IMAGE_ICON != IconDIR->idType && IMAGE_CURSOR != IconDIR->idType))
       {
          return NULL;
       }
@@ -377,7 +378,8 @@
 				 0,
 				 0);
 
-      if (IconDIR == NULL)
+      if (IconDIR == NULL || 0 != IconDIR->idReserved
+          || (IMAGE_ICON != IconDIR->idType && IMAGE_CURSOR != IconDIR->idType))
 	  {
 	    CloseHandle(hFile);
 	    CloseHandle(hSection);

reactos/lib/user32/windows
icon.c 1.22 -> 1.23
diff -u -r1.22 -r1.23
--- icon.c	15 Aug 2004 21:36:29 -0000	1.22
+++ icon.c	5 Oct 2004 22:08:56 -0000	1.23
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: icon.c,v 1.22 2004/08/15 21:36:29 chorns Exp $
+/* $Id: icon.c,v 1.23 2004/10/05 22:08:56 gvg Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/icon.c
@@ -569,7 +569,7 @@
    GRPCURSORICONDIR *dir = (GRPCURSORICONDIR*)presbits;
    UINT retVal = 0;
 
-   if (dir && !dir->idReserved && (dir->idType & 3))
+   if (dir && !dir->idReserved && (IMAGE_ICON == dir->idType || IMAGE_CURSOR == dir->idType))
    {
       GRPCURSORICONDIRENTRY *entry;
       HDC hdc;
CVSspam 0.2.8