comctl32: Safely handle large wParam in SB_GETPARTS.

Signed-off-by: Mark Jansen <mark.jansen@reactos.org>
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Mark Jansen 2021-11-12 10:46:52 -05:00 committed by Alexandre Julliard
parent 0d4392077e
commit bb24e75625
1 changed files with 2 additions and 0 deletions

View File

@ -401,6 +401,8 @@ STATUSBAR_GetParts (const STATUS_INFO *infoPtr, INT num_parts, INT parts[])
TRACE("(%d)\n", num_parts);
if (parts) {
if (num_parts > infoPtr->numParts)
num_parts = infoPtr->numParts;
for (i = 0; i < num_parts; i++) {
parts[i] = infoPtr->parts[i].x;
}