You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-16 22:42:38 +02:00
Check for packet_length 0, it is already treated as invalid by the padding check,
but that resulted in a confusing/wrong error message. Originally committed as revision 19361 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -633,7 +633,7 @@ static int ff_asf_get_packet(AVFormatContext *s, ByteIOContext *pb)
|
|||||||
DO_2BITS(asf->packet_flags >> 3, padsize, 0); // padding length
|
DO_2BITS(asf->packet_flags >> 3, padsize, 0); // padding length
|
||||||
|
|
||||||
//the following checks prevent overflows and infinite loops
|
//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));
|
av_log(s, AV_LOG_ERROR, "invalid packet_length %d at:%"PRId64"\n", packet_length, url_ftell(pb));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user