From c7802eb216b180951386489a06dc2faac90e25b7 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sat, 20 Nov 2004 21:14:16 +0000 Subject: [PATCH] - Allocate buffer for sub keys from NonPagedPool in order to prevent crashes in CmiAddKeyToList where the buffer is accessed at DISPATCH_LEVEL. svn path=/trunk/; revision=11722 --- reactos/ntoskrnl/cm/registry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/cm/registry.c b/reactos/ntoskrnl/cm/registry.c index 26b3a80625b..c20580962bd 100644 --- a/reactos/ntoskrnl/cm/registry.c +++ b/reactos/ntoskrnl/cm/registry.c @@ -1,4 +1,4 @@ -/* $Id: registry.c,v 1.127 2004/10/22 20:14:04 ekohl Exp $ +/* $Id: registry.c,v 1.128 2004/11/20 21:14:16 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -642,7 +642,7 @@ CmiConnectHive(IN POBJECT_ATTRIBUTES KeyObjectAttributes, NewKey->NumberOfSubKeys = 0; if (NewKey->KeyCell->NumberOfSubKeys != 0) { - NewKey->SubKeys = ExAllocatePool(PagedPool, + NewKey->SubKeys = ExAllocatePool(NonPagedPool, NewKey->KeyCell->NumberOfSubKeys * sizeof(ULONG)); if (NewKey->SubKeys == NULL) {