[ros-diffs] [cwittich] 36413: overrun of static array Fix for Coverity error CID: 546 + 547.

cwittich at svn.reactos.org cwittich at svn.reactos.org
Tue Sep 23 09:38:01 CEST 2008


Author: cwittich
Date: Tue Sep 23 02:38:00 2008
New Revision: 36413

URL: http://svn.reactos.org/svn/reactos?rev=36413&view=rev
Log:
overrun of static array
Fix for Coverity error CID: 546 + 547.

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

Modified: trunk/reactos/dll/win32/user32/windows/defwnd.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/defwnd.c?rev=36413&r1=36412&r2=36413&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] Tue Sep 23 02:38:00 2008
@@ -61,7 +61,7 @@
 DWORD STDCALL
 GetSysColor(int nIndex)
 {
-  if(nIndex >= 0 && nIndex <= NUM_SYSCOLORS)
+  if(nIndex >= 0 && nIndex < NUM_SYSCOLORS)
   {
     return g_psi->SysColors[nIndex];
   }
@@ -91,7 +91,7 @@
 HBRUSH STDCALL
 GetSysColorBrush(int nIndex)
 {
-  if(nIndex >= 0 && nIndex <= NUM_SYSCOLORS)
+  if(nIndex >= 0 && nIndex < NUM_SYSCOLORS)
   {
     return g_psi->SysColorBrushes[nIndex];
   }



More information about the Ros-diffs mailing list