mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 19:26:33 +00:00
overrun of static array
Fix for Coverity error CID: 546 + 547. svn path=/trunk/; revision=36413
This commit is contained in:
@@ -61,7 +61,7 @@ InitStockObjects(void)
|
||||
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 @@ GetSysColorPen(int nIndex)
|
||||
HBRUSH STDCALL
|
||||
GetSysColorBrush(int nIndex)
|
||||
{
|
||||
if(nIndex >= 0 && nIndex <= NUM_SYSCOLORS)
|
||||
if(nIndex >= 0 && nIndex < NUM_SYSCOLORS)
|
||||
{
|
||||
return g_psi->SysColorBrushes[nIndex];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user