avformat/jpegxl_anim_dec: ensure input padding is zeroed

Fixes use of uninitialized value, reported by MSAN.

Found by OSS-Fuzz.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>

Fixes: 70837/clusterfuzz-testcase-minimized-ffmpeg_dem_JPEGXL_ANIM_fuzzer-5089407768526848
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Kacper Michajłow 2024-06-27 02:40:37 +02:00 committed by Michael Niedermayer
parent 3978e81809
commit 2b5f000d3f
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 2 additions and 0 deletions

View File

@ -124,6 +124,8 @@ static int jpegxl_anim_read_header(AVFormatContext *s)
}
}
memset(head + headsize, 0, AV_INPUT_BUFFER_PADDING_SIZE);
/* offset in bits of the animation header */
ret = ff_jpegxl_parse_codestream_header(head, headsize, &meta, 0);
if (ret < 0 || meta.animation_offset <= 0)