It already skips any extra bytes at the end, and apparently there are some samples in the wild with larger 'kuki' chunks. --- libavformat/cafdec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c index 6c40b1b..b2eccb9 100644 --- a/libavformat/cafdec.c +++ b/libavformat/cafdec.c @@ -124,7 +124,7 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size) #define ALAC_HEADER 36 #define ALAC_NEW_KUKI 24 uint8_t preamble[12]; - if (size < ALAC_NEW_KUKI || size > ALAC_PREAMBLE + ALAC_HEADER) { + if (size < ALAC_NEW_KUKI) { av_log(s, AV_LOG_ERROR, "invalid ALAC magic cookie\n"); avio_skip(pb, size); return AVERROR_INVALIDDATA; -- 1.7.1 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel