SeSetSecurityDescriptorInfo/Ex check the security object pointer for null. http:...
authorJames Tabor <james.tabor@reactos.org>
Tue, 1 Apr 2008 00:31:56 +0000 (00:31 +0000)
committerJames Tabor <james.tabor@reactos.org>
Tue, 1 Apr 2008 00:31:56 +0000 (00:31 +0000)
svn path=/trunk/; revision=32800

reactos/ntoskrnl/se/sd.c

index 31d2a6a..46ad70b 100644 (file)
@@ -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.
     
-    ObjectSd = *ObjectsSecurityDescriptor;
     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;
 }