[COMCTL32] Fix crash on SB_GETPARTS

wParam (num_parts) is allowed to be bigger than the actual amount of parts
CORE-17842
This commit is contained in:
Mark Jansen
2021-11-01 22:46:12 +01:00
parent 39003dd408
commit 0ae3805375

View File

@@ -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;
}