summaryrefslogtreecommitdiff
path: root/libavcodec/snow.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-05-13 10:45:26 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-05-13 10:45:26 +0000
commit3a1a7e32ace7af47de74e8ae779cb4e04c89aa97 (patch)
tree54f9925f5f74bf9ca24ede510f6deffd98f2e2c6 /libavcodec/snow.c
parentce1d2a95c3d73663aecc6e5f51533d2bcf1fb1ae (diff)
sanity checks, some might have been exploitable ...
Originally committed as revision 5369 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/snow.c')
-rw-r--r--libavcodec/snow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index 084a298625..7480b1c475 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -3712,7 +3712,7 @@ static int decode_header(SnowContext *s){
s->mv_scale= get_symbol(&s->c, s->header_state, 0);
s->qbias= get_symbol(&s->c, s->header_state, 1);
s->block_max_depth= get_symbol(&s->c, s->header_state, 0);
- if(s->block_max_depth > 1){
+ if(s->block_max_depth > 1 || s->block_max_depth < 0){
av_log(s->avctx, AV_LOG_ERROR, "block_max_depth= %d is too large", s->block_max_depth);
s->block_max_depth= 0;
return -1;