[ros-diffs] [akhaldi] 54487: [HAL] * Timo Kreuzer: Fix a NULL pointer dereference. CID 13453.

akhaldi at svn.reactos.org akhaldi at svn.reactos.org
Thu Nov 24 11:25:41 UTC 2011


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?rev=54487&r1=54486&r2=54487&view=diff
==============================================================================
--- 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))




More information about the Ros-diffs mailing list