Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-15 01:20:39 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-12-15 01:24:44 +0400
commite1ba29c76430ce511fd901c8b7a1bd199b169dc0 (patch)
tree6ffb3cd1e4cc68c1e3bdd2167fd389a4c78f0e12 /libavcodec/4xm.c
parent76b9a0961c33c9eb19b220c6f0edfbb3e79fcd59 (diff)
4xm: check if there are bits left in decode_i_block()
Fixed Ticket753 Bug Found by: Diana Elena Muscalu Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/4xm.c')
-rw-r--r--libavcodec/4xm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 9350f06e9b..f854f1cfb5 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -459,6 +459,11 @@ static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
static int decode_i_block(FourXContext *f, DCTELEM *block){
int code, i, j, level, val;
+ if(get_bits_left(&f->gb) < 2){
+ av_log(f->avctx, AV_LOG_ERROR, "%d bits left before decode_i_block()\n", get_bits_left(&f->gb));
+ return -1;
+ }
+
/* DC coef */
val = get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3);
if (val>>4){