Author: pschweitzer
Date: Sun May 5 19:24:25 2013
New Revision: 58949
URL:
http://svn.reactos.org/svn/reactos?rev=58949&view=rev
Log:
[RTL]
Don't allocate an extra privilege entry when not required.
Still doesn't fix issue.
Modified:
trunk/reactos/lib/rtl/priv.c
Modified: trunk/reactos/lib/rtl/priv.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/priv.c?rev=58949&a…
==============================================================================
--- trunk/reactos/lib/rtl/priv.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/priv.c [iso-8859-1] Sun May 5 19:24:25 2013
@@ -11,7 +11,7 @@
#include <rtl.h>
-#define NDEBUG
+//#define NDEBUG
#include <debug.h>
/* FUNCTIONS ***************************************************************/
@@ -138,7 +138,7 @@
* 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;