mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
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>
This commit is contained in:
parent
61047f0f82
commit
9fc141f32d
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user