Message ID | 20240711233417.1896879-16-michael@niedermayer.cc |
---|---|
State | New |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:2298:b0:482:c625:d099 with SMTP id fp24csp489448vqb; Thu, 11 Jul 2024 16:44:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUALyIVXJrxOfpvKSwRuaFIl7bQz7J705fA/KPwD2GU+TUT2tkS1mjuIqcB/773ef5/mv95PGAuywAOlJcBeW/yiIGhSS80WbGj1g== X-Google-Smtp-Source: AGHT+IE5frkTcwP7xHmBYj1QI//dQy7wx1mcGE/RRRQN3onwnkDoa/BIe21Bwn3Mdl+KE9eTJNL5 X-Received: by 2002:a17:906:4e91:b0:a75:25b8:ffc with SMTP id a640c23a62f3a-a780b8848bemr597003066b.57.1720741457106; Thu, 11 Jul 2024 16:44:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720741457; cv=none; d=google.com; s=arc-20160816; b=V368voz0u8Zpa5VZVjlBMu4j732yzc6PTad5nD2z7GS+16YJvoQuMd1XDwG0fl8t/L FvdfOiph5n6Rz/axMoBefrLBRmet3kEtrIiu7zr/BSiG6oNsrjvkI6eUebLkD+Hj+dff cmR6Gyd6NKy5RRJ3xcKBx5fbvY5EAUuq2LBZtDJ2HWbx38lPleLOOVco9F4S5KnihiqD s0lkukso1WKa8MyuSTS9L6mXIkoQxuxGQZN2TvH+53WXiZWB66iRwmpyUZnibzYUzWdy yEzZvhIOnQDtLpVLcM2tYGGJ1IYGfLCwMHtDmpgMTcExxUHRrp7YHKTE07q2Jh460oQE oaNg== 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=hNR3L4/PYSVuR9MxO0bfRxO2v5Muse1F9jcyHPPnWVQ=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=SD5SCfByahL6hfvTfKRpoEK3L3jYPRxJ1hHqSB2BM3T2lxnnYCxdhzUedZfULkG9KS vFF8mLvHxn/ZuLqtxmUWMa5KT1JYzQ/qFYB8kQDNozSN9P+BB/9AaBTjAHebLqrinRy2 rYO2fUBBYweayKWyaJy2uvItTQrnR1vkKwIZ/QYEM98v4HfDtdMhQgYSZTJ/xKqItVAB MMlTFKGxC4C6OHOuedrDAFIfxza4TokHI5R4o4R33RI7qvkb7uHwOZPPUce1N/LvpIeq qv0NzenxgOnYEmWWVJX9nB7xlb2bouqw1/27nmR9v1Z5EvDNeLtVreJYAjCXs4bY9ZqO FTVg==; 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=Ida53C6b; 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: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a780a9ddfc0si354400166b.227.2024.07.11.16.44.16; Thu, 11 Jul 2024 16:44:17 -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=Ida53C6b; 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 76B7068DB9F; Fri, 12 Jul 2024 02:34:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 51E8268DB9C for <ffmpeg-devel@ffmpeg.org>; Fri, 12 Jul 2024 02:34:31 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 9260D240003 for <ffmpeg-devel@ffmpeg.org>; Thu, 11 Jul 2024 23:34:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720740870; 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=ZghPp5hGJXy8RMSWsN0kXalbmcwGFPM7a/ss2bNP7Es=; b=Ida53C6b3e3OWxPB/rqH9F2sOUtSMc504WDxkwMw+98gDff1+tytxB3Msq27aZAI5VjKWU XdNxNp9p072Z0gf+LaJsA2D7LyHXCQ4pT9Ybkgjh8yBCHbfR+tTX5185xZhM45Ki2AJ6zK 1sJ0/6ea6vrvYdpGcpcH5W7rBz/Sd50kHNqQe7klmRO3jKKtz906A20gDcOkP7hbSdgOos 8tWKG3ElksWIQ0nWTBaH2mh7YACJsQFjDakMKxaE/AiVJ3EefpiIVqcwp1Pt1zsklbeMeC HgwY5v1snvjDYFndns6EW9laPMUXi5wbYx8a40JjuQKfvG8TopzGP6HPlTon9Q== From: Michael Niedermayer <michael@niedermayer.cc> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Date: Fri, 12 Jul 2024 01:34:10 +0200 Message-ID: <20240711233417.1896879-16-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240711233417.1896879-1-michael@niedermayer.cc> References: <20240711233417.1896879-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 16/22] avformat/webpenc: Check filesize in trailer X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: 67kWGBmSEn5L |
Series |
[FFmpeg-devel,01/22] avformat/asfdec_o: Check size of index object
|
expand
|
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavformat/webpenc.c b/libavformat/webpenc.c index 1c5b93e0abf..ce0d046aa94 100644 --- a/libavformat/webpenc.c +++ b/libavformat/webpenc.c @@ -190,7 +190,7 @@ static int webp_write_trailer(AVFormatContext *s) if (!ret) { filesize = avio_tell(s->pb); - if (avio_seek(s->pb, 4, SEEK_SET) == 4) { + if (filesize >= 8 && avio_seek(s->pb, 4, SEEK_SET) == 4) { avio_wl32(s->pb, filesize - 8); // Note: without the following, avio only writes 8 bytes to the file. avio_seek(s->pb, filesize, SEEK_SET);
not sure this is possible Fixes: CID1604446 Overflowed constant Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavformat/webpenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)