[jcifs] SmbFile.getDiskFreeSpace bug
Thomas Krammer
tkrammer at nxn-software.com
Wed Jan 26 13:41:20 GMT 2005
Hi,
SmbFile.getDiskFreeSpace() returns a negative value on a share with 2.8
TB of free disk space (310885233664 bytes to be exact...)
It seems from the code that the free disk space is transfered as a 32
bit integer (number of free blocks) and a 16 bit integer (block size). I
guess the 32 bit integer overflows and the result becomes negative.
I'm using JCIFS 0.7.3 but the code to determine the free disk space
hasn't changed between 0.7.3 and 1.1.7. So I think this bug is also
present in JCIFS 1.1.7.
Regards,
Thomas
More information about the jcifs
mailing list