From patchwork Wed Jul 10 22:50:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 50462 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b968:0:b0:482:c625:d099 with SMTP id w8csp706734vqx; Wed, 10 Jul 2024 15:50:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVpM989NJY1Ht1ee4yGM8X9p9XIXmObFSHtDOBy4T+KnS5B6GjE4P47UINMXMmYYomuXWtCyrn5ZZ6g5DO0HOgK0rd2WaLFDwLSiA== X-Google-Smtp-Source: AGHT+IEgEiEGy4EwU/RIipUW5g9YAyhm6GumliOWs3TpeVFHuCgP7PtJrGvhdl+5t6l7jPkKQt7U X-Received: by 2002:a17:906:b748:b0:a77:eddf:a49c with SMTP id a640c23a62f3a-a780b6fef57mr389928866b.41.1720651848547; Wed, 10 Jul 2024 15:50:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720651848; cv=none; d=google.com; s=arc-20160816; b=zQ0anyGDfif39SMJIeF+MkRAlyaRvmXHvAVQ+m0MgEEmzjeSiHFRiSK1PXjKwhupR0 rdYl7VXUuarfJOyh23djOlrgsftL9EEnPu6VoFBtlUbxbQURqv1lgcKU/sWxXtm2Yn8k XHu0XVD0sT6f2voeAbJ236HL+D3Lww4YmhIEu1H1P2YPyVWTqg4XSDNqgzlExUVDgX8P 8nLFac8DOPj9O/e62kd4c/gNYRAPsnzGTeZU+H3lY9MUB2SN3qu92/7tkjgUegol4Cbj 1j+XiB8wVlJqQha8zn8YpLDUrpFD2eoupX7/Q+/UIYxqZQGQokRnC7+DxO4GjCEcjgVH yHjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=MlteVnybz6hbhxWAgRJ3QbpGIdybYNlZMZ2XUahyiyk=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=ICQIsyxwBpv9BoYO1I8g6QF9jUb+pmNPXqwKIGQwHGglw7iCh/CqPOReB8UwFygbPm /3lpvMqh4BorYBiQzcHbOgPR6Bjt6kas2/Ahb97EJW+wTJHHxebZ/NxwPwIcQjUMMW4u ovKsXb0Gc38TrqjVt7a5GwNNbn1OTIcMNGq/DptLTtnryD+QMjiOocmxkho89Ac37bOQ s4YXK1VHMCvBrGqjWdQqqFcIZCF+Awk7H46euIHbOQ6Vo+BFrq9LVfpv5cGzg6c0VqQb XEym6CIGZw+EMeJ/Zm0MCrSCjYm7XRXgxrJrNoy+YFbRqf4BRILN5WTfvKJdjp3PJ622 XNGw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=auTZzRQh; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a780a9c8481si246513666b.148.2024.07.10.15.50.48; Wed, 10 Jul 2024 15:50:48 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=auTZzRQh; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3DE2768DBA6; Thu, 11 Jul 2024 01:50:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5DDE768D87E for ; Thu, 11 Jul 2024 01:50:16 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B9B1760002 for ; Wed, 10 Jul 2024 22:50:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720651815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3dQXnunaoRuuveibvCeCAZMNQlcBD7O7jU4/XWg1mQw=; b=auTZzRQhDzt+JhcN4opcld+VsNezC7xscxNKBwaBWWpWy+8T+el1rs4hMIJdCliAkwEdU6 ZKN1JJJgGefJN3mlxbixOUsuxg8jiG0UrZDRDLwaTZeBP2YYkItKNV5n9UGjeyP+4Bv1GU +JkyfyMbgdjlgo5uCo68DFqVUFGtKTJlI/HmhXtn/DX5xeWukvNmnlQhOGhZitWvpMA9C4 CAVQ+mxGiFjhbSkquT2fwtRwzCScO7vHKE2fzp8Xfq1snrAXI3WPXtFAE7XR59kGlcbY+0 DbhhmlX0fQdUhTJJnMH8T7nZ4N4MjoGzeRk7kGBEY/FH1FiLXWY2MTsb/lraWg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 11 Jul 2024 00:50:09 +0200 Message-ID: <20240710225012.691594-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240710225012.691594-1-michael@niedermayer.cc> References: <20240710225012.691594-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 3/6] avfilter/vf_tpad: Dont clone NULL X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: J30OynUo9nij untested Fixes: CID1440836 Dereference after null check Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/vf_tpad.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c index 72d0bf338fe..a230a50022c 100644 --- a/libavfilter/vf_tpad.c +++ b/libavfilter/vf_tpad.c @@ -132,6 +132,7 @@ static int activate(AVFilterContext *ctx) s->cache_start = ff_inlink_peek_frame(inlink, 0); } else if (!s->cache_start) { FF_FILTER_FORWARD_WANTED(outlink, inlink); + return FFERROR_NOT_READY; } frame = av_frame_clone(s->cache_start); if (!frame)