projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5972c0c
)
[TASKMGR] Fix a heap corruption bug (#4311)
author
Valerij Zaporogeci
<vlrzprgts@gmail.com>
Tue, 25 Jan 2022 14:49:46 +0000
(16:49 +0200)
committer
GitHub
<noreply@github.com>
Tue, 25 Jan 2022 14:49:46 +0000
(15:49 +0100)
Improper adjustment of the array index in graphctl.c, introduced in PR #4141 lead to an off-by-one heap corruption.
base/applications/taskmgr/graphctl.c
patch
|
blob
|
history
diff --git
a/base/applications/taskmgr/graphctl.c
b/base/applications/taskmgr/graphctl.c
index
0d15f4d
..
4253eea
100644
(file)
--- a/
base/applications/taskmgr/graphctl.c
+++ b/
base/applications/taskmgr/graphctl.c
@@
-150,7
+150,7
@@
GraphCtrl_AddPoint(PTM_GRAPH_CONTROL inst, BYTE val0, BYTE val1)
t = inst->PointBuffer;
Prev0 = *(t + inst->CurrIndex);
Prev1 = *(t + inst->CurrIndex + inst->NumberOfPoints);
- if (inst->CurrIndex < inst->NumberOfPoints)
+ if (inst->CurrIndex < inst->NumberOfPoints
- 1
)
{
inst->CurrIndex++;
}