fs: fix reads with pos > 4GB
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
This fixes an issue in node 10 where all file reads with position > 4GB returns the data stored at position 0 in the file.
I would appreciate a quick review/release on this as this can have pretty serious consequences obvs (I just corrupted some local databases because of it).
A test case is available here: https://gist.github.com/mafintosh/1f9adf37bbc7ea05f1d2da6ab2d0f7a1
I'm happy to add it but not sure if we expect the tests to run on file systems that all support sparse files. Otherwise it would be a very slow test case.