ASan heap-buffer-overflow in ReadMP3APETag when parsing malformed MP3GAIN_ALBUM_MINMAX APE tag values (apetag.c:294)
UBSan: signed left shift 1<<31 when writing APE header flags in WriteMP3GainAPETag (apetag.c:531)
Reproduction Build mp3gain with UndefinedBehaviorSanitizer enabled. Run: export UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_stacktrace=1 ./mp3gain poc_apetag_319_ReadMP3APETag.mp3 The attached PoC triggers the UBSan report.
UBSan: signed left shift 1<<31 when testing APE header flag in ReadMP3APETag (apetag.c:319)