Module: wine Branch: master Commit: d91eab24d245d13642cf2fd5d96a9f5851fdb240 URL: https://gitlab.winehq.org/wine/wine/-/commit/d91eab24d245d13642cf2fd5d96a9f5...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Sat Dec 30 13:11:34 2023 +0800
win32u: Fix a possible out-of-bounds write (Coverity).
---
dlls/win32u/sysparams.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index ad6e7dce39b..a9563eaff84 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -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 */