diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c index 74d637554f..4bc76a321c 100644 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@ -527,7 +527,8 @@ static void read_chapter(AVFormatContext *s, AVIOContext *pb, int len, char *tta int taglen; char tag[5]; - decode_str(s, pb, 0, &dst, &len); + if (decode_str(s, pb, 0, &dst, &len) < 0) + return; if (len < 16) return;