From cb3495c0cb5fc160b29bbd85692781b6ad09c7fc Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 27 Jan 2020 21:54:22 +0100 Subject: [PATCH] avcodec/avdct: Clear IDCTDSPContext context Fixes use of uninitialized variable and segfault Reviewed-by: Paul B Mahol Reviewed-by: James Almer Signed-off-by: Michael Niedermayer (cherry picked from commit b82825eba837f7cbb24c1d66e93285d029307417) Signed-off-by: Michael Niedermayer --- libavcodec/avdct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/avdct.c b/libavcodec/avdct.c index 80aca8872b..7853f7a226 100644 --- a/libavcodec/avdct.c +++ b/libavcodec/avdct.c @@ -109,7 +109,7 @@ int avcodec_dct_init(AVDCT *dsp) #if CONFIG_IDCTDSP { - IDCTDSPContext idsp; + IDCTDSPContext idsp = {0}; ff_idctdsp_init(&idsp, avctx); COPY(idsp, idct); COPY(idsp, idct_permutation);