From 4664a1f6ed9ab250c08b82b661243e1f75cd21d7 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Fri, 8 Oct 2004 21:20:35 +0000 Subject: [PATCH] - Fix one error case to prevent crashes when registry enumeration fails. svn path=/trunk/; revision=11236 --- reactos/ntoskrnl/io/resource.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/io/resource.c b/reactos/ntoskrnl/io/resource.c index 724799192b8..b91b56de146 100644 --- a/reactos/ntoskrnl/io/resource.c +++ b/reactos/ntoskrnl/io/resource.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: resource.c,v 1.19 2004/08/15 16:39:03 chorns Exp $ +/* $Id: resource.c,v 1.20 2004/10/08 21:20:35 navaraf Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/resource.c @@ -383,7 +383,10 @@ IopQueryDeviceDescription( Status = ZwQueryValueKey(PeripheralKeyHandle, &PeripheralString, KeyValueFullInformation, NULL, 0, &LenKeyFullInformation); if(!NT_SUCCESS(Status) && Status != STATUS_BUFFER_TOO_SMALL && Status != STATUS_BUFFER_OVERFLOW) + { + PeripheralInformation[PeripheralLoop] = NULL; continue; + } /* Allocate it */ PeripheralInformation[PeripheralLoop] = ExAllocatePoolWithTag(PagedPool, LenKeyFullInformation, TAG_IO_RESOURCE);