[USER32]
authorJérôme Gardou <jerome.gardou@reactos.org>
Thu, 23 Oct 2014 15:40:13 +0000 (15:40 +0000)
committerJérôme Gardou <jerome.gardou@reactos.org>
Thu, 23 Oct 2014 15:40:13 +0000 (15:40 +0000)
 - Fix wrong size check.
Spotted by Thomas

svn path=/trunk/; revision=64926

reactos/win32ss/user/user32/windows/cursoricon_new.c

index c6810ea..a4a2aff 100644 (file)
@@ -397,7 +397,7 @@ get_best_icon_file_entry(
     if ( dwFileSize < sizeof(*dir) )
         return NULL;
 
     if ( dwFileSize < sizeof(*dir) )
         return NULL;
 
-    if (dwFileSize < (sizeof(*dir) + FIELD_OFFSET(CURSORICONFILEDIR, idEntries[dir->idCount])))
+    if (dwFileSize < FIELD_OFFSET(CURSORICONFILEDIR, idEntries[dir->idCount]))
         return NULL;
 
     /* 
         return NULL;
 
     /*