stos: ob: Zero object on init for security

Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
Chloe M.
2026-06-25 00:48:44 +00:00
parent 283547058e
commit 70c3a30f72
+2
View File
@@ -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;