Don't allocate an extra privilege entry when not required.
Still doesn't fix issue.

svn path=/trunk/; revision=58949
This commit is contained in:
Pierre Schweitzer 2013-05-05 19:24:25 +00:00
parent f96e0193f4
commit 9818ea06e5

View file

@ -11,7 +11,7 @@
#include <rtl.h>
#define NDEBUG
//#define NDEBUG
#include <debug.h>
/* 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;