mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 08:17:09 +08:00
[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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user