Commit a91fd8fb authored by Andrew Nguyen's avatar Andrew Nguyen Committed by Alexandre Julliard

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

Spotted with Valgrind.
parent dd1b9372
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment