[DEVMGR]
authorEric Kohl <eric.kohl@reactos.org>
Mon, 19 Jan 2015 21:10:04 +0000 (21:10 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Mon, 19 Jan 2015 21:10:04 +0000 (21:10 +0000)
Enlarge the buffer by one WCHAR if REG_SZ values are being retrieved. This fixes strange enumerator properties.

svn path=/trunk/; revision=66065

reactos/dll/win32/devmgr/advprop.c

index 5761752..5070280 100644 (file)
@@ -757,6 +757,9 @@ DisplayDevicePropertyText(IN PDEVADVPROP_INFO dap,
         return;
     }
 
+    if (dwType == REG_SZ)
+        dwSize += sizeof(WCHAR);
+
     lpBuffer = HeapAlloc(GetProcessHeap(),
                          HEAP_ZERO_MEMORY,
                          dwSize);