samtools / htslib

C library for high-throughput sequencing data formats
Other
784 stars 447 forks source link

Fix a minor memory leak in malformed CRAM EXTERNAL blocks. #1671

Closed jkbonfield closed 9 months ago

jkbonfield commented 9 months ago

If we have an unofficial CRAM v4.0 encoded file and are attempting to use non-byte based data in an EXTERNAL encoded block, then we didn't free the cram_codecs structure when failing to parse and initialise.

Credit to OSS-Fuzz Fixes oss-fuzz 62144