From 0ae3805375aaef8f0cb5a769dbd5e305d83607bd Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Mon, 1 Nov 2021 22:46:12 +0100 Subject: [PATCH] [COMCTL32] Fix crash on SB_GETPARTS wParam (num_parts) is allowed to be bigger than the actual amount of parts CORE-17842 --- dll/win32/comctl32/status.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dll/win32/comctl32/status.c b/dll/win32/comctl32/status.c index 6ef04a66282..45d2e265357 100644 --- a/dll/win32/comctl32/status.c +++ b/dll/win32/comctl32/status.c @@ -432,6 +432,10 @@ STATUSBAR_GetParts (const STATUS_INFO *infoPtr, INT num_parts, INT parts[]) TRACE("(%d)\n", num_parts); if (parts) { +#ifdef __REACTOS__ + if (num_parts > infoPtr->numParts) + num_parts = infoPtr->numParts; +#endif for (i = 0; i < num_parts; i++) { parts[i] = infoPtr->parts[i].x; }