Mark Jansen : comctl32: Safely handle large wParam in SB_GETPARTS.

Alexandre Julliard julliard at winehq.org
Fri Nov 12 16:16:05 CST 2021


Module: wine
Branch: master
Commit: bb24e756253272a929b970ea8b76336cb8c14254
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=bb24e756253272a929b970ea8b76336cb8c14254

Author: Mark Jansen <mark.jansen at 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 at reactos.org>
Signed-off-by: Thomas Faber <thomas.faber at reactos.org>
Signed-off-by: Alexandre Julliard <julliard at 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;
 	}




More information about the wine-cvs mailing list