Skip to content
Snippets Groups Projects
Commit bca6dee3 authored by Anton Khirnov's avatar Anton Khirnov Committed by Ronald S. Bultje
Browse files

id3v2: explicitly seek to the end of the tag after reading


Current code might stop in the middle of an invalid tag.

fixes issue2650

Signed-off-by: default avatarRonald S. Bultje <rsbultje@gmail.com>
parent 933e90a6
No related branches found
No related tags found
No related merge requests found
......@@ -186,7 +186,7 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
{
int isv34, tlen, unsync;
char tag[5];
int64_t next;
int64_t next, end = avio_tell(s->pb) + len;
int taghdrlen;
const char *reason;
AVIOContext pb;
......@@ -284,8 +284,9 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
avio_skip(s->pb, len);
}
if (version == 4 && flags & 0x10) /* Footer preset, always 10 bytes, skip over it */
avio_skip(s->pb, 10);
end += 10;
avio_seek(s->pb, end, SEEK_SET);
av_free(buffer);
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment