Commit 3b38e9f3 authored by reimar's avatar reimar

Check for packet_lenght 0, it is already treated as invalid by the padding check,

but that resulted in a confusing/wrong error message.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19361 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7008345a
......@@ -633,7 +633,7 @@ static int ff_asf_get_packet(AVFormatContext *s, ByteIOContext *pb)
DO_2BITS(asf->packet_flags >> 3, padsize, 0); // padding length
//the following checks prevent overflows and infinite loops
if(packet_length >= (1U<<29)){
if(!packet_length || packet_length >= (1U<<29)){
av_log(s, AV_LOG_ERROR, "invalid packet_length %d at:%"PRId64"\n", packet_length, url_ftell(pb));
return -1;
}
......
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