[NTOSKRNL]: DACL and SACL should only be returned if the control flag indicates that...
authorAlex Ionescu <aionescu@gmail.com>
Thu, 20 Sep 2012 00:04:42 +0000 (00:04 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Thu, 20 Sep 2012 00:04:42 +0000 (00:04 +0000)
svn path=/trunk/; revision=57347

reactos/ntoskrnl/include/internal/se.h

index d547369..13f18e2 100644 (file)
@@ -69,6 +69,8 @@ SepGetDaclFromDescriptor(PVOID _Descriptor)
     PISECURITY_DESCRIPTOR Descriptor = (PISECURITY_DESCRIPTOR)_Descriptor;
     PISECURITY_DESCRIPTOR_RELATIVE SdRel;
 
+    if (!(Descriptor->Control & SE_DACL_PRESENT)) return NULL;
+
     if (Descriptor->Control & SE_SELF_RELATIVE)
     {
         SdRel = (PISECURITY_DESCRIPTOR_RELATIVE)Descriptor;
@@ -88,6 +90,8 @@ SepGetSaclFromDescriptor(PVOID _Descriptor)
     PISECURITY_DESCRIPTOR Descriptor = (PISECURITY_DESCRIPTOR)_Descriptor;
     PISECURITY_DESCRIPTOR_RELATIVE SdRel;
 
+    if (!(Descriptor->Control & SE_SACL_PRESENT)) return NULL;
+
     if (Descriptor->Control & SE_SELF_RELATIVE)
     {
         SdRel = (PISECURITY_DESCRIPTOR_RELATIVE)Descriptor;