PR #26026 opened by OctopusET URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/26026 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/26026.patch
# Summary of changes Missing goto fail in compile_single(), see https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25865#issuecomment-83307 >From 1bbaf31506ddb2854b896abecff372fcd48ad449 Mon Sep 17 00:00:00 2001 From: Sungjoon Moon <[email protected]> Date: Thu, 12 Nov 2026 13:53:45 +0900 Subject: [PATCH] swscale/ops_dispatch: fix leak on ERANGE in compile_single() Signed-off-by: Sungjoon Moon <[email protected]> --- libswscale/ops_dispatch.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libswscale/ops_dispatch.c b/libswscale/ops_dispatch.c index 129251daf12..3cfdb73f58e 100644 --- a/libswscale/ops_dispatch.c +++ b/libswscale/ops_dispatch.c @@ -586,8 +586,10 @@ static int compile_single(const CompileArgs *args, const SwsOpList *ops, p->pixel_bits_out = rw_pixel_bits(write); p->palette_idx = -1; p->num_blocks = (dst->width + comp->block_size - 1) / comp->block_size; - if (p->num_blocks * comp->block_size < (unsigned) dst->width) - return AVERROR(ERANGE); + if (p->num_blocks * comp->block_size < (unsigned) dst->width) { + ret = AVERROR(ERANGE); + goto fail; + } SwsOpExec *exec = &p->exec_base; *exec = (SwsOpExec) { -- 2.54.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
