projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
468cae2
)
[NTOSKRNL]
author
Amine Khaldi
<amine.khaldi@reactos.org>
Fri, 11 Oct 2013 19:37:29 +0000
(19:37 +0000)
committer
Amine Khaldi
<amine.khaldi@reactos.org>
Fri, 11 Oct 2013 19:37:29 +0000
(19:37 +0000)
* Add a sanity check to prevent a potential out-of-bounds write. CID 731662.
CORE-6681
svn path=/trunk/; revision=60619
reactos/ntoskrnl/ob/oblife.c
patch
|
blob
|
history
diff --git
a/reactos/ntoskrnl/ob/oblife.c
b/reactos/ntoskrnl/ob/oblife.c
index
74a640b
..
99879b7
100644
(file)
--- a/
reactos/ntoskrnl/ob/oblife.c
+++ b/
reactos/ntoskrnl/ob/oblife.c
@@
-1236,6
+1236,9
@@
ObCreateObjectType(IN PUNICODE_STRING TypeName,
/* Set the index and the entry into the object type array */
LocalObjectType->Index = ObpTypeObjectType->TotalNumberOfObjects;
+
+ NT_ASSERT(LocalObjectType->Index != 0);
+
if (LocalObjectType->Index < 32)
{
/* It fits, insert it */