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>2015-02-24 05:12:22 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-02-24 05:15:42 +0300
commit8f4cbf940212079a34753c7f4d6c6b5a43586d30 (patch)
tree7b4e0651bc1d97d1b8debf3f247ef76fdae6a58f /libavcodec/snowdec.c
parentfb8e5044b420d4f7409a3bf2cc5498e8302882be (diff)
avcodec/snowdec: Fix ref value check
Fixes integer overflow and out of array read. Fixes: signal_sigsegv_24169e6_3445_cov_3778346427_snow_chroma_bug.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/snowdec.c')
-rw-r--r--libavcodec/snowdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c
index e37190d0f9..81fe03c9c1 100644
--- a/libavcodec/snowdec.c
+++ b/libavcodec/snowdec.c
@@ -174,7 +174,7 @@ static int decode_q_branch(SnowContext *s, int level, int x, int y){
int l = left->color[0];
int cb= left->color[1];
int cr= left->color[2];
- int ref = 0;
+ unsigned ref = 0;
int ref_context= av_log2(2*left->ref) + av_log2(2*top->ref);
int mx_context= av_log2(2*FFABS(left->mx - top->mx)) + 0*av_log2(2*FFABS(tr->mx - top->mx));
int my_context= av_log2(2*FFABS(left->my - top->my)) + 0*av_log2(2*FFABS(tr->my - top->my));