aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2023-06-18 23:50:16 +0200
committerLeo Izen <leo.izen@gmail.com>2023-06-18 17:54:19 -0400
commit9fc141f32d52099a6bfeba6e4e7ee2ce7fadc833 (patch)
treec21956859ae6f5da77e3e13e3e4386256012a54b
parent61047f0f82c76620cc42888958dd9834bcaa18fb (diff)
downloadffmpeg-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.c2
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) {