goadb
goadb copied to clipboard
(DirEntry).Size not returning correct value for sizes >= 5GB
It seems there is a sort of integer overflow when attempting to query sizes of large files (>5GB).
For example:
$ du -b 5gb.img
5368709120 5gb.img
(Trying to get size for this file via (DirEntry).Size returns 1073741824)
$ du -h 6gb.img
6442450944 6gb.img
(Trying to get size for this file via (DirEntry).Size returns -2147483648)
$ du -h 10gb.img
10737418240 10gb.img
(Trying to get size for this file via (DirEntry).Size returns -2147483648)
Note: Range of int32 is -2147483648 through 2147483647.
Any workarounds/solutions to get the proper sizes?
@zach-klippenstein