[FFmpeg-cvslog] avcodec/imc: dont read bits beyond the end
Michael Niedermayer
git at videolan.org
Wed Dec 17 05:23:44 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 17 04:51:06 2014 +0100| [3ba105029279bf43e6338849f360f1ce9a2973a0] | committer: Michael Niedermayer
avcodec/imc: dont read bits beyond the end
Fixes use of uninitialized memory
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3ba105029279bf43e6338849f360f1ce9a2973a0
---
libavcodec/imc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index b367ccb..a3254f1 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;
More information about the ffmpeg-cvslog
mailing list