From 9818ea06e5fefb4154e9c557ffa12b715695206e Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 5 May 2013 19:24:25 +0000 Subject: [PATCH] [RTL] Don't allocate an extra privilege entry when not required. Still doesn't fix issue. svn path=/trunk/; revision=58949 --- reactos/lib/rtl/priv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/lib/rtl/priv.c b/reactos/lib/rtl/priv.c index 286b2b2ceda..5a047cc4a3f 100644 --- a/reactos/lib/rtl/priv.c +++ b/reactos/lib/rtl/priv.c @@ -11,7 +11,7 @@ #include -#define NDEBUG +//#define NDEBUG #include /* FUNCTIONS ***************************************************************/ @@ -138,7 +138,7 @@ RtlAcquirePrivilege(IN PULONG Privilege, * new privileges (big enough, after old privileges memory area) */ State = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(RTL_ACQUIRE_STATE) + sizeof(TOKEN_PRIVILEGES) + - NumPriv * sizeof(LUID_AND_ATTRIBUTES)); + (NumPriv - ANYSIZE_ARRAY) * sizeof(LUID_AND_ATTRIBUTES)); if (!State) { return STATUS_NO_MEMORY;