logo       

SmbFile.getDiskFreeSpace bug: msg#00125

network.samba.java

Subject: SmbFile.getDiskFreeSpace bug

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



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise