Author: akhaldi
Date: Thu Nov 24 11:25:40 2011
New Revision: 54487
URL:
http://svn.reactos.org/svn/reactos?rev=54487&view=rev
Log:
[HAL]
* Timo Kreuzer: Fix a NULL pointer dereference. CID 13453.
Modified:
trunk/reactos/hal/halx86/acpi/halacpi.c
Modified: trunk/reactos/hal/halx86/acpi/halacpi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/acpi/halacpi.c?…
==============================================================================
--- trunk/reactos/hal/halx86/acpi/halacpi.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/acpi/halacpi.c [iso-8859-1] Thu Nov 24 11:25:40 2011
@@ -747,19 +747,22 @@
{
/* Use HAL heap */
HalpUnmapVirtualAddress(MappedAddress, TableLength);
+
+ LoaderExtension = LoaderBlock->Extension;
}
else
{
/* Use Mm */
MmUnmapIoSpace(MappedAddress, TableLength << PAGE_SHIFT);
+
+ LoaderExtension = NULL;
}
/* Cache the RSDT */
HalpAcpiCacheTable(&Rsdt->Header);
/* Check for compatible loader block extension */
- LoaderExtension = LoaderBlock->Extension;
- if (LoaderExtension->Size >= 0x58)
+ if (LoaderExtension && (LoaderExtension->Size >= 0x58))
{
/* Compatible loader: did it provide an ACPI table override? */
if ((LoaderExtension->AcpiTable) &&
(LoaderExtension->AcpiTableSize))