stos: ob: Zero object on init for security
Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
@@ -35,7 +35,9 @@ ObCreateObject(const CHAR *Name, OBJECT_TYPE Type, VOID *Data, ST_OBJECT **Resul
|
||||
return STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
RtlMemSet(Object, 0, sizeof(*Object));
|
||||
RtlMemCpy(Object->Name, Name, NameLen);
|
||||
|
||||
Object->Name[NameLen] = '\0';
|
||||
Object->RefCount = 1;
|
||||
Object->Type = Type;
|
||||
|
||||
Reference in New Issue
Block a user