]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/scpr: Fix use of uninitialized variable
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 27 Feb 2019 23:12:14 +0000 (00:12 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 6 Mar 2019 22:40:47 +0000 (23:40 +0100)
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@niedermayer.cc>
libavcodec/scpr.c

index cf511f83ccc8f4d1d9a25e7cb1d24e77adc58bf7..750cf59fe49ee38e8c72e5e87abe1f2717185b37 100644 (file)
@@ -372,7 +372,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)