diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-02-10 22:43:30 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-02-10 22:43:30 +0000 |
commit | ae2d2d6c41c3b55ba06a021a3681a3173502423f (patch) | |
tree | 90fc2f4113dd4c174a4e686331ae4b88349491e7 /libavcodec | |
parent | dce778e0ea295db541e43b0850d3a7ef873996cc (diff) | |
download | ffmpeg-ae2d2d6c41c3b55ba06a021a3681a3173502423f.tar.gz |
check for qscale==0 (fixes 1/0 on one corrupted stream)
Originally committed as revision 1574 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/msmpeg4.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c index 5aee0cf90a..a17890d527 100644 --- a/libavcodec/msmpeg4.c +++ b/libavcodec/msmpeg4.c @@ -1228,6 +1228,10 @@ return -1; } #endif s->qscale = get_bits(&s->gb, 5); + if(s->qscale==0){ + fprintf(stderr, "invalid qscale\n"); + return -1; + } if (s->pict_type == I_TYPE) { code = get_bits(&s->gb, 5); |