Commit d91eab24 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

win32u: Fix a possible out-of-bounds write (Coverity).

parent 20b4cdde
......@@ -6121,7 +6121,7 @@ BOOL WINAPI NtUserSetSysColors( INT count, const INT *colors, const COLORREF *va
if (IS_INTRESOURCE(colors)) return FALSE; /* stupid app passes a color instead of an array */
for (i = 0; i < count; i++)
if (colors[i] >= 0 && colors[i] <= ARRAY_SIZE( system_colors ))
if (colors[i] >= 0 && colors[i] < ARRAY_SIZE( system_colors ))
set_entry( &system_colors[colors[i]], values[i], 0, 0 );
/* Send WM_SYSCOLORCHANGE message to all windows */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment