aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-07-06 17:08:32 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-07-06 17:08:32 +0000
commit96f0731a26cd417f4dc113fe7324c276e60a99bd (patch)
tree02d19be853630b433f3627eea0500215d49e2849 /libavformat
parent4f76697b3e251e6fc24ef55349a69670c0193657 (diff)
downloadffmpeg-96f0731a26cd417f4dc113fe7324c276e60a99bd.tar.gz
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
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/asfdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 373be28223..9f445ecc4f 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -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;
}