Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix possible heap overflow in cram_encode_aux() on bad RG:Z tags
RG:Z tags without a proper NUL termination could lead to use of invalid data, or a heap overflow when the tag is passed to sam_hrecs_find_rg(), or hts_log_warning() if the former returns NULL. Fix by moving the line that skips to the end of the aux tag and then checking that it was terminated correctly. Should it not be, the aux parser is reset so the tag can be stored verbatim (the code that does that already handles badly-terminated Z tags). Credit to OSS-Fuzz Fixes oss-fuzz 66369
- Loading branch information