From a41296aef54cb491b5e0a5083de798676d7e57ec Mon Sep 17 00:00:00 2001 From: Vincent Rabaud Date: Tue, 29 Nov 2016 13:19:32 +0100 Subject: [PATCH] Fix potentially uninitialized value. Change-Id: I721695e22474992db3094942b1ad4754ae7c0a02 --- src/enc/predictor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/enc/predictor.c b/src/enc/predictor.c index b51e6e87..daceb9f3 100644 --- a/src/enc/predictor.c +++ b/src/enc/predictor.c @@ -244,7 +244,8 @@ static WEBP_INLINE void GetResidual( } else { predict = pred_func(current_row[x - 1], upper_row + x); } - if (mode == 0 || y == 0 || y == height - 1 || x == 0 || x == width - 1) { + if (max_quantization == 1 || mode == 0 || y == 0 || y == height - 1 || + x == 0 || x == width - 1) { residual = VP8LSubPixels(current_row[x], predict); } else { residual = NearLossless(current_row[x], predict, max_quantization,