Commit 76982b07 authored by reimar's avatar reimar

Return an error when the parsed mpc chunk size is negative, otherwise we

might end up in an endless loop where the same chunk is parsed over and over.
Fixes a hang near the end for http://samples.mplayerhq.hu/A-codecs/musepack/sv8/sv8-tags.mpc


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20099 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent da005843
......@@ -250,6 +250,8 @@ static int mpc8_read_packet(AVFormatContext *s, AVPacket *pkt)
while(!url_feof(s->pb)){
pos = url_ftell(s->pb);
mpc8_get_chunk_header(s->pb, &tag, &size);
if (size < 0)
return -1;
if(tag == TAG_AUDIOPACKET){
if(av_get_packet(s->pb, pkt, size) < 0)
return AVERROR(ENOMEM);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment