aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mdec.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2011-05-10 11:29:08 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2011-05-18 06:54:15 -0400
commit32ac63ee10ca5daa149344a75d736c1b98177392 (patch)
tree86bf2a073d5714debf192140cd23f71e46ba08b6 /libavcodec/mdec.c
parenta26d2b4bc8af02b27168c277c5097273c05652c2 (diff)
downloadffmpeg-32ac63ee10ca5daa149344a75d736c1b98177392.tar.gz
mdec.c: fix overread.
Diffstat (limited to 'libavcodec/mdec.c')
-rw-r--r--libavcodec/mdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index 545b919411..9b6e6b6dd9 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -125,7 +125,8 @@ static inline int decode_mb(MDECContext *a, DCTELEM block[6][64]){
a->dsp.clear_blocks(block[0]);
for(i=0; i<6; i++){
- if( mdec_decode_block_intra(a, block[ block_index[i] ], block_index[i]) < 0)
+ if( mdec_decode_block_intra(a, block[ block_index[i] ], block_index[i]) < 0 ||
+ get_bits_left(&a->gb) < 0)
return -1;
}
return 0;