[FFmpeg-cvslog] r18393 - trunk/libavcodec/snow.c
michael
subversion
Thu Apr 9 20:47:50 CEST 2009
Author: michael
Date: Thu Apr 9 20:47:50 2009
New Revision: 18393
Log:
Make sure the block array is of the correct size.
This might have been exploitable.
Modified:
trunk/libavcodec/snow.c
Modified: trunk/libavcodec/snow.c
==============================================================================
--- trunk/libavcodec/snow.c Thu Apr 9 20:37:26 2009 (r18392)
+++ trunk/libavcodec/snow.c Thu Apr 9 20:47:50 2009 (r18393)
@@ -1626,6 +1626,7 @@ static int alloc_blocks(SnowContext *s){
s->b_width = w;
s->b_height= h;
+ av_free(s->block);
s->block= av_mallocz(w * h * sizeof(BlockNode) << (s->block_max_depth*2));
return 0;
}
@@ -4517,7 +4518,7 @@ static int decode_frame(AVCodecContext *
&& p->hcoeff[2]==2;
}
- if(!s->block) alloc_blocks(s);
+ alloc_blocks(s);
frame_start(s);
//keyframe flag duplication mess FIXME
More information about the ffmpeg-cvslog
mailing list