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>2014-12-17 06:51:06 +0300
committerMichael Niedermayer <michaelni@gmx.at>2014-12-17 07:14:11 +0300
commit3ba105029279bf43e6338849f360f1ce9a2973a0 (patch)
tree6b375913be8021d058be920714d3763e991bb314 /libavcodec/imc.c
parentddd7dac7ae0515ea6036396bb50d7bb5f702aeef (diff)
avcodec/imc: dont read bits beyond the end
Fixes use of uninitialized memory Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/imc.c')
-rw-r--r--libavcodec/imc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index b367ccb172..a3254f12ab 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -808,9 +808,8 @@ static void imc_get_coeffs(AVCodecContext *avctx,
av_log(avctx, AV_LOG_WARNING,
"Potential problem on band %i, coefficient %i"
": cw_len=%i\n", i, j, cw_len);
- }
-
- cw = get_bits(&q->gb, cw_len);
+ } else
+ cw = get_bits(&q->gb, cw_len);
}
chctx->codewords[j] = cw;