[ros-diffs] [dgorbachev] 53836: [User32] Check return value of DIB_GetBitmapInfo.

dgorbachev at svn.reactos.org dgorbachev at svn.reactos.org
Sat Sep 24 13:37:25 UTC 2011


Author: dgorbachev
Date: Sat Sep 24 13:37:24 2011
New Revision: 53836

URL: http://svn.reactos.org/svn/reactos?rev=53836&view=rev
Log:
[User32]
Check return value of DIB_GetBitmapInfo.

Modified:
    trunk/reactos/dll/win32/user32/windows/cursoricon.c

Modified: trunk/reactos/dll/win32/user32/windows/cursoricon.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/cursoricon.c?rev=53836&r1=53835&r2=53836&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/cursoricon.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/cursoricon.c [iso-8859-1] Sat Sep 24 13:37:24 2011
@@ -1703,13 +1703,13 @@
     else
         new_height = height;
 
-    if(bm_type == 0)
+    if (bm_type == 0)
     {
         BITMAPCOREHEADER *core = (BITMAPCOREHEADER *)&scaled_info->bmiHeader;
         core->bcWidth = new_width;
         core->bcHeight = new_height;
     }
-    else
+    else if (bm_type == 1)
     {
         /* Some sanity checks for BITMAPINFO (not applicable to BITMAPCOREINFO) */
         if (info->bmiHeader.biHeight > 65535 || info->bmiHeader.biWidth > 65535) {
@@ -1720,6 +1720,8 @@
         scaled_info->bmiHeader.biWidth = new_width;
         scaled_info->bmiHeader.biHeight = new_height;
     }
+    else
+        goto end;
 
     if (new_height < 0) new_height = -new_height;
 




More information about the Ros-diffs mailing list