diff --git a/reactos/ntoskrnl/include/internal/se.h b/reactos/ntoskrnl/include/internal/se.h index d5473690aa5..13f18e23f11 100644 --- a/reactos/ntoskrnl/include/internal/se.h +++ b/reactos/ntoskrnl/include/internal/se.h @@ -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;