https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0ae3805375aaef8f0cb5a7...
commit 0ae3805375aaef8f0cb5a769dbd5e305d83607bd Author: Mark Jansen mark.jansen@reactos.org AuthorDate: Mon Nov 1 22:46:12 2021 +0100 Commit: Mark Jansen mark.jansen@reactos.org CommitDate: Wed Nov 10 17:29:35 2021 +0100
[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; }