Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protect against negative POS fields in CRAM encoder. #1801

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

jkbonfield
Copy link
Contributor

We check pos against the ref end, and if that fits we then fetch &ref[apos] to get the reference, but this understeps the array.

The fastest way to handle all this and other related errors is simply to sanity check the input for out of bounds POS and bail out early.

Credit to OSS-Fuzz
Fixes oss-fuzz 70014

We check pos against the ref end, and if that fits we then fetch
`&ref[apos]` to get the reference, but this understeps the array.

The fastest way to handle all this and other related errors is simply
to sanity check the input for out of bounds POS and bail out early.

Credit to OSS-Fuzz
Fixes oss-fuzz 70014
@daviesrob daviesrob merged commit abe8583 into samtools:develop Jul 2, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants