1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

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@niedermayer.cc>
(cherry picked from commit 53248acfb3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2019-02-28 00:12:14 +01:00
parent c90836cc3d
commit 67d030787e

View File

@ -512,7 +512,7 @@ static int decompress_p(AVCodecContext *avctx,
{ {
SCPRContext *s = avctx->priv_data; SCPRContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb; 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; int backstep = linesize - avctx->width;
if (bytestream2_get_byte(gb) == 0) if (bytestream2_get_byte(gb) == 0)