http://bugs.winehq.org/show_bug.cgi?id=29706
Bug #: 29706 Summary: GetDiskFreeSpaceEx() returns negative sizes for large drives Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: ntdll AssignedTo: wine-bugs@winehq.org ReportedBy: fgouget@codeweavers.com Classification: Unclassified
When faced with a partition that has more than 1TB of free disk space it looks like this API returns a negative value. Apparently this happened on OpenSUSE 11.4 64bit with a 32bit Wine; but not being fortunate enough to have this much free disk space I cannot verify this.
I suspect some Unix API we call returns the free disk size in block of 512 bytes, thus overflowing at 2^31-1 blocks which is about 1TB. Then GetDiskFreeSpaceEx() takes that and returns a negative free disk space.
Note that GetDiskFreeSpaceEx() returns 64bit values so there's no obstable to it handle such large disks in theory.