Allocate room for terminator. Fixes bug 1203, r20343 can be re-applied.

svn path=/trunk/; revision=20472
This commit is contained in:
Gé van Geldorp 2005-12-30 23:44:03 +00:00
parent 1523f688af
commit b907d39b7a

View 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));