Skip to content
Snippets Groups Projects
Commit 6ec6492f authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard
Browse files

GetDiskFreeSpaceEx32A can get null pointers and still not crash.

parent 9be2f2a8
No related branches found
No related tags found
No related merge requests found
......@@ -827,10 +827,14 @@ BOOL32 WINAPI GetDiskFreeSpaceEx32A( LPCSTR root,
}
if (!DRIVE_GetFreeSpace(drive, &size, &available)) return FALSE;
/*FIXME: Do we have the number of bytes available to the user? */
avail->HighPart = available.HighPart;
totalfree->HighPart = size.HighPart;
avail->LowPart = available.LowPart ;
totalfree->LowPart = size.LowPart ;
if (totalfree) {
totalfree->HighPart = size.HighPart;
totalfree->LowPart = size.LowPart ;
}
if (avail) {
avail->HighPart = available.HighPart;
avail->LowPart = available.LowPart ;
}
return TRUE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment