1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

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

This commit is contained in:
Zhiyi Zhang 2023-12-30 13:11:34 +08:00 committed by Alexandre Julliard
parent 20b4cdde55
commit d91eab24d2

View file

@ -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 */