diff mbox

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

Message ID 20190227234900.12258-1-michael@niedermayer.cc
State Accepted
Commit 53248acfb3b23007c89ae822d7bcae451272d5a7
Headers show

Commit Message

Michael Niedermayer Feb. 27, 2019, 11:49 p.m. UTC
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer March 6, 2019, 10:50 a.m. UTC | #1
On Thu, Feb 28, 2019 at 12:49:00AM +0100, Michael Niedermayer wrote:
> 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 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

[...]
diff mbox

Patch

diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c
index cf511f83cc..750cf59fe4 100644
--- a/libavcodec/scpr.c
+++ b/libavcodec/scpr.c
@@ -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)