Allocate room for terminator. Fixes bug 1203, r20343 can be re-applied.
authorGé van Geldorp <ge@gse.nl>
Fri, 30 Dec 2005 23:44:03 +0000 (23:44 +0000)
committerGé van Geldorp <ge@gse.nl>
Fri, 30 Dec 2005 23:44:03 +0000 (23:44 +0000)
svn path=/trunk/; revision=20472

reactos/lib/setupapi/devinst.c

index 02c4df0..0dbf02f 100644 (file)
@@ -5608,7 +5608,7 @@ SetupDiBuildDriverInfoList(
                 currentInfFileDetails = HeapAlloc(
                     GetProcessHeap(),
                     0,
-                    FIELD_OFFSET(struct InfFileDetails, FullInfFileName) + wcslen(FullInfFileName) * sizeof(WCHAR) + UNICODE_NULL);
+                    FIELD_OFFSET(struct InfFileDetails, FullInfFileName) + wcslen(FullInfFileName) * sizeof(WCHAR) + sizeof(UNICODE_NULL));
                 if (!currentInfFileDetails)
                     continue;
                 memset(currentInfFileDetails, 0, sizeof(struct InfFileDetails));