A bgzip read with an offset asserts when the offset is invalid / above the file limit.
The assertion was from bgzf_useek when the offset position is beyond the uncompressed file size.
It is modified to return a failure in such case to avoid the assertion.
It might even be OK to remove the assertion but the "todo" comment along with it indicates some unclear case that an explicit failure seems better.
A bgzip read with an offset asserts when the offset is invalid / above the file limit. The assertion was from bgzf_useek when the offset position is beyond the uncompressed file size. It is modified to return a failure in such case to avoid the assertion.
It might even be OK to remove the assertion but the "todo" comment along with it indicates some unclear case that an explicit failure seems better.