Closed tomwhite closed 5 years ago
For files that are larger than 2GB (e.g. an uncompressed FASTA) it is possible that length - position in SeekableStream#available() overflows an int, resulting in a negative value being returned.
length - position
SeekableStream#available()
This fixes the problem described here: https://github.com/broadinstitute/gatk/issues/5547
@cmnbroad @lbergelson can you review please?
I really wish that java would throw exceptions on overflow...
I wonder if there are any static analysis tools that would have pointed this out as a probable error...
Description
For files that are larger than 2GB (e.g. an uncompressed FASTA) it is possible that
length - position
inSeekableStream#available()
overflows an int, resulting in a negative value being returned.This fixes the problem described here: https://github.com/broadinstitute/gatk/issues/5547
Checklist