diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2023-06-18 23:50:16 +0200 |
---|---|---|
committer | Leo Izen <leo.izen@gmail.com> | 2023-06-18 17:54:19 -0400 |
commit | 9fc141f32d52099a6bfeba6e4e7ee2ce7fadc833 (patch) | |
tree | c21956859ae6f5da77e3e13e3e4386256012a54b | |
parent | 61047f0f82c76620cc42888958dd9834bcaa18fb (diff) | |
download | ffmpeg-9fc141f32d52099a6bfeba6e4e7ee2ce7fadc833.tar.gz |
avformat/jpegxl_anim_dec: Perform operations in a different order
Fixes: OOM
Fixes: 59802/clusterfuzz-testcase-minimized-ffmpeg_dem_JPEGXL_ANIM_fuzzer-5681765466112000
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/jpegxl_anim_dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/jpegxl_anim_dec.c b/libavformat/jpegxl_anim_dec.c index ec400c955c..8d6ea5005c 100644 --- a/libavformat/jpegxl_anim_dec.c +++ b/libavformat/jpegxl_anim_dec.c @@ -231,7 +231,7 @@ static int jpegxl_anim_read_packet(AVFormatContext *s, AVPacket *pkt) if (ctx->initial && size < ctx->initial->size) size = ctx->initial->size; - if ((ret = av_new_packet(pkt, size) < 0)) + if ((ret = av_new_packet(pkt, size)) < 0) return ret; if (ctx->initial) { |