setupapi: Allocate the proper number of bytes for the drive spec.
Spotted with Valgrind.
This commit is contained in:
parent
dd1b937287
commit
a91fd8fbb2
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue