setupapi: Allocate the proper number of bytes for the drive spec.

Spotted with Valgrind.
This commit is contained in:
Andrew Nguyen 2011-01-15 02:28:30 -06:00 committed by Alexandre Julliard
parent dd1b937287
commit a91fd8fbb2
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ BOOL WINAPI SetupQuerySpaceRequiredOnDriveW(HDSKSPC DiskSpace,
return FALSE;
}
driveW = HeapAlloc(GetProcessHeap(), 0, lstrlenW(DriveSpec) + 2);
driveW = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(DriveSpec) + 2) * sizeof(WCHAR));
if (!driveW)
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);