From 575c79dc439cd9f96103a27d347ded01fd305934 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Tue, 1 Apr 2008 00:31:56 +0000 Subject: [PATCH] SeSetSecurityDescriptorInfo/Ex check the security object pointer for null. http://msdn2.microsoft.com/en-us/library/ms800810.aspx svn path=/trunk/; revision=32800 --- reactos/ntoskrnl/se/sd.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/se/sd.c b/reactos/ntoskrnl/se/sd.c index 31d2a6a4847..46ad70b94ee 100644 --- a/reactos/ntoskrnl/se/sd.c +++ b/reactos/ntoskrnl/se/sd.c @@ -906,9 +906,12 @@ SeSetSecurityDescriptorInfo(IN PVOID Object OPTIONAL, ULONG Control = 0; ULONG_PTR Current; SECURITY_INFORMATION SecurityInformation; - - + ObjectSd = *ObjectsSecurityDescriptor; + + if (!ObjectSd) + return STATUS_NO_SECURITY_ON_OBJECT; // The object does not have a security descriptor. + SecurityInformation = *_SecurityInformation; /* Get owner and owner size */ @@ -1083,6 +1086,11 @@ SeSetSecurityDescriptorInfoEx( IN PGENERIC_MAPPING GenericMapping ) { + PISECURITY_DESCRIPTOR ObjectSd = *ObjectsSecurityDescriptor; + + if (!ObjectSd) + return STATUS_NO_SECURITY_ON_OBJECT; // The object does not have a security descriptor. + UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED; }