projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39003dd
)
[COMCTL32] Fix crash on SB_GETPARTS
author
Mark Jansen
<mark.jansen@reactos.org>
Mon, 1 Nov 2021 21:46:12 +0000
(22:46 +0100)
committer
Mark Jansen
<mark.jansen@reactos.org>
Wed, 10 Nov 2021 16:29:35 +0000
(17:29 +0100)
wParam (num_parts) is allowed to be bigger than the actual amount of parts
CORE-17842
dll/win32/comctl32/status.c
patch
|
blob
|
history
diff --git
a/dll/win32/comctl32/status.c
b/dll/win32/comctl32/status.c
index
6ef04a6
..
45d2e26
100644
(file)
--- 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;
}