diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index edfee164b4..8d92aec96e 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -183,7 +183,7 @@ static int mp3_read_packet(AVFormatContext *s, AVPacket *pkt) return AVERROR_EOF; } - if (ret > ID3v1_TAG_SIZE && + if (ret >= ID3v1_TAG_SIZE && memcmp(&pkt->data[ret - ID3v1_TAG_SIZE], "TAG", 3) == 0) ret -= ID3v1_TAG_SIZE;