[NTOSKRNL]

* Add a sanity check to prevent a potential out-of-bounds write. CID 731662.
CORE-6681

svn path=/trunk/; revision=60619
This commit is contained in:
Amine Khaldi 2013-10-11 19:37:29 +00:00
parent 468cae26b2
commit 2e94a56a52

View file

@ -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 */