[ACPI]
authorThomas Faber <thomas.faber@reactos.org>
Thu, 19 May 2016 10:15:15 +0000 (10:15 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Thu, 19 May 2016 10:15:15 +0000 (10:15 +0000)
- Correctly double-null-terminate hardware IDs
CORE-11271 #resolve

svn path=/trunk/; revision=71354

reactos/drivers/bus/acpi/acpienum.c

index 9097f3c..a084b31 100644 (file)
@@ -29,7 +29,7 @@ Bus_PlugInDevice (
     NTSTATUS            status;
     ULONG               index;
        WCHAR               temp[256];
-    PLIST_ENTRY         entry; 
+    PLIST_ENTRY         entry;
 
     PAGED_CODE ();
 
@@ -110,13 +110,13 @@ Bus_PlugInDevice (
                index += swprintf(&temp[index],
                                                        L"ACPI\\%hs",
                                                        Device->pnp.hardware_id);
-               index++;
+               temp[index++] = UNICODE_NULL;
 
                index += swprintf(&temp[index],
                                                        L"*%hs",
                                                        Device->pnp.hardware_id);
-               index++;
-               temp[++index] = UNICODE_NULL;
+               temp[index++] = UNICODE_NULL;
+               temp[index++] = UNICODE_NULL;
 
                pdoData->HardwareIDs = ExAllocatePoolWithTag(NonPagedPool, index*sizeof(WCHAR), 'DpcA');