[Ffmpeg-cvslog] r7797 - trunk/libavcodec/vc1.c
kostya
subversion
Thu Feb 1 19:39:49 CET 2007
Author: kostya
Date: Thu Feb 1 19:39:49 2007
New Revision: 7797
Modified:
trunk/libavcodec/vc1.c
Log:
Check for out-of-bounds access
Modified: trunk/libavcodec/vc1.c
==============================================================================
--- trunk/libavcodec/vc1.c (original)
+++ trunk/libavcodec/vc1.c Thu Feb 1 19:39:49 2007
@@ -2890,8 +2890,8 @@
ac_val -= 16 * s->block_wrap[n];
q1 = s->current_picture.qscale_table[mb_pos];
- if(dc_pred_dir && c_avail) q2 = s->current_picture.qscale_table[mb_pos - 1];
- if(!dc_pred_dir && a_avail) q2 = s->current_picture.qscale_table[mb_pos - s->mb_stride];
+ if(dc_pred_dir && c_avail && mb_pos) q2 = s->current_picture.qscale_table[mb_pos - 1];
+ if(!dc_pred_dir && a_avail && mb_pos >= s->mb_stride) q2 = s->current_picture.qscale_table[mb_pos - s->mb_stride];
if(n && n<4) q2 = q1;
if(coded) {
More information about the ffmpeg-cvslog
mailing list