diff mbox series

[FFmpeg-devel,4/9] avformat/jpegxl_anim_dec: clear buffer padding

Message ID 20240816231157.3166012-4-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/9] avformat/rmdec: check that bug if completely filled | expand

Commit Message

Michael Niedermayer Aug. 16, 2024, 11:11 p.m. UTC
Fixes: use of uninitialized value
Fixes: 70992/clusterfuzz-testcase-minimized-ffmpeg_dem_IMAGE2_fuzzer-5735819170611200

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/jpegxl_anim_dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavformat/jpegxl_anim_dec.c b/libavformat/jpegxl_anim_dec.c
index 2338a2e8c07..7798f3dabc2 100644
--- a/libavformat/jpegxl_anim_dec.c
+++ b/libavformat/jpegxl_anim_dec.c
@@ -43,7 +43,7 @@  typedef struct JXLAnimDemuxContext {
 
 static int jpegxl_anim_probe(const AVProbeData *p)
 {
-    uint8_t buffer[4096 + AV_INPUT_BUFFER_PADDING_SIZE];
+    uint8_t buffer[4096 + AV_INPUT_BUFFER_PADDING_SIZE] = {0};
     int copied = 0, ret;
     FFJXLMetadata meta = { 0 };