Module: wine Branch: master Commit: bb24e756253272a929b970ea8b76336cb8c14254 URL: https://source.winehq.org/git/wine.git/?a=commit;h=bb24e756253272a929b970ea8...
Author: Mark Jansen mark.jansen@reactos.org Date: Fri Nov 12 10:46:52 2021 -0500
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
---
dlls/comctl32/status.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index 9078e4a70bc..ac93d7712c0 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -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; }