[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec snow.c,1.64,1.65
Michael Niedermayer CVS
michael
Sat Dec 3 15:20:06 CET 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv22523
Modified Files:
snow.c
Log Message:
check block_max_depth (fixes crash)
Index: snow.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/snow.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- snow.c 3 Dec 2005 03:07:54 -0000 1.64
+++ snow.c 3 Dec 2005 14:20:03 -0000 1.65
@@ -3185,6 +3185,11 @@
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){
+ 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;
+ }
return 0;
}
More information about the ffmpeg-cvslog
mailing list