[FFmpeg-cvslog] avcodec/scpr: Fix use of uninitialized variable

Michael Niedermayer git at videolan.org
Thu Mar 14 02:06:22 EET 2019


ffmpeg | branch: release/4.1 | Michael Niedermayer <michael at niedermayer.cc> | Thu Feb 28 00:12:14 2019 +0100| [67d030787e0b9b5350545bf2d2d64642d2c5ccb7] | committer: Michael Niedermayer

avcodec/scpr: Fix use of uninitialized variable

Fixes: Undefined shift
Fixes: 12911/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5677102915911680

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 53248acfb3b23007c89ae822d7bcae451272d5a7)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=67d030787e0b9b5350545bf2d2d64642d2c5ccb7
---

 libavcodec/scpr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c
index e41fbbec13..5714e25170 100644
--- a/libavcodec/scpr.c
+++ b/libavcodec/scpr.c
@@ -512,7 +512,7 @@ static int decompress_p(AVCodecContext *avctx,
 {
     SCPRContext *s = avctx->priv_data;
     GetByteContext *gb = &s->gb;
-    int ret, temp, min, max, x, y, cx = 0, cx1 = 0;
+    int ret, temp = 0, min, max, x, y, cx = 0, cx1 = 0;
     int backstep = linesize - avctx->width;
 
     if (bytestream2_get_byte(gb) == 0)



More information about the ffmpeg-cvslog mailing list