samtools / htslib

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

fix fuzz integer overflow in cram encoder. #1775

Closed jkbonfield closed 2 months ago

jkbonfield commented 2 months ago

Input files with very long CIGAR strings and consensus generated embedded reference can lead to exceptionally long CRAM blocks which overflow the check for large size fluctuations (to trigger new compression metric assessments).

Reformulated the expression to avoid scaling up values.

Credit to OSS-Fuzz Fixes oss-fuzz 68225

daviesrob commented 2 months ago

Rebased to pick up the recent test fixes...