Current code might stop in the middle of an invalid tag.
fixes issue2650
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
{
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;
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;