aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2023-08-02 02:01:33 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2023-08-04 00:06:26 +0200
commit044ab532fcbbb457fce56c92b7ac99cfcc29a89a (patch)
tree9c3cf13cb57414c273019fdeaad90e67d5a39b82
parent207e9f4e505d969d6ff7545b449295a1b88d6d1c (diff)
downloadffmpeg-044ab532fcbbb457fce56c92b7ac99cfcc29a89a.tar.gz
avcodec/jpeg2000htdec: Avoid freeing uninitialized pointers in ff_jpeg2000_decode_htj2k()
Fixes: freeing of uninitialized pointers Fixes: part of 58299 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Tomas Härdin <git@haerdin.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/jpeg2000htdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/jpeg2000htdec.c b/libavcodec/jpeg2000htdec.c
index 4c4e54710d..2b082b3b2f 100644
--- a/libavcodec/jpeg2000htdec.c
+++ b/libavcodec/jpeg2000htdec.c
@@ -1174,8 +1174,8 @@ ff_jpeg2000_decode_htj2k(const Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c
int ret;
/* Temporary buffers */
- int32_t *sample_buf;
- uint8_t *block_states;
+ int32_t *sample_buf = NULL;
+ uint8_t *block_states = NULL;
int32_t n, val; // Post-processing