From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id C5AD64DF26 for ; Thu, 8 Jan 2026 02:53:00 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'3GBogj+KdbVuFKOqw//Rf8ydDzRSHiu4QLChIsNCkJI=', expected b'9KQ/x4KH1o8qA3FuU1Q88p2jYtJgBbxj4HmxrUV1Mw8=')) header.d=niedermayer.cc header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1767840768; h=date : to : message-id : references : mime-version : in-reply-to : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : from; bh=zScDPHWDyf280d147Xavn1MxLk5e/Xty0MsCHFOAhmQ=; b=SJLxMMJ0uQxVElRqeYQH1xpxfTGGw+I9g9yPSCG4l26HLswuR7gkUuZs5wRV5zoDamkIU cGIG99dcsmo78MPgn/MLZw/yfmeRpvYCQ1hJb4GTflULCOindQwCbBxBWr9YXfH1ZbFsT9A VzsEc/g8MlOFjWPsjz8rQh+ftwC8Z8khcsmP1/IN2K41lSkobiEuEgZmMHRiXHJt3gKjV8M vYqybEnCdUxtbyUoPBkcLAGnjd0+lV8hh/9CMjecaPsY4q1NEmaHvw8Z10Cc5XSeogoCmB2 kvHW4d2PDUE6qcVBfL/F2c1JXZjIsXUUaP9nakX+8M2nDCCt8Hubqm/9ee1A== Received: from [172.20.0.4] (unknown [172.20.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id D4D3E690D9D; Thu, 8 Jan 2026 04:52:48 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1767840751; b=d7+s4VzzsBVK85rcXuOqdnxHMTH1CtRm7MVdYM/wSfhwsmNuZB02SZ843ec9t5t3c1tMQ FFCcX0KS/395XUwF8aF7g/L1E4ioLQqksMOGzXC8JNVw1486fTGwJLccUrNXlE7df1i2gtm rGHR+lLcd/7jTWAzvVlLVekoNAS0sbzWyVnKVzlgn0kOByzPL9t5Y4JZEpfJiCIsQ3deK94 hqREqDm8/Q6Lus9Nj3GDHhEvqWW9nSrcN/fQsYjWqWLzxmg44IGM70KjlpM5+mp9F8y66uU SnFDD0Urk6ieHzzWyIoki1pK/LOfEc774tAC9Jq4hVWxKq7YyILhEQzPvSHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1767840751; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=3GBogj+KdbVuFKOqw//Rf8ydDzRSHiu4QLChIsNCkJI=; b=alzUjhHZPQFM2CmkOB8UdHwAezmWKfx2SSxGC158UCkP+iQKQ9iptzLC0NvRzI5VKyhG2 1cign2Gu+bVTmEAgbfQSwkCdoTg35KIxuqJUtIHihw4cWCwu9jmhNg75eQ81s1oEoY7kiN6 /9bywJ819D/RzW5R0IquiBKg/lxXRf+P/B3OdTpB35WeWjeqRNE970lePUwOVaKcjSUh+eX fIcLWqoDS4+ok8un119JafBY3orF5AonkqAW5ZiX7T5/uExlBlHBU5RKmLI1V/bfWJ3a7Ii fTQV9CDfdEiPoNrwI13NTt0PBU04GcArvQnpKFVPx8gMoV+JOOBGBvf0ncvg== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=niedermayer.cc; arc=none; dmarc=none Authentication-Results: ffmpeg.org; dkim=pass header.d=niedermayer.cc; arc=none (Message is not ARC signed); dmarc=none Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id BC74C690D23 for ; Thu, 8 Jan 2026 04:52:18 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 0824143F1C for ; Thu, 8 Jan 2026 02:52:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1767840738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9KQ/x4KH1o8qA3FuU1Q88p2jYtJgBbxj4HmxrUV1Mw8=; b=VKFs+fMw6zlYstjqraRpQS7y0MdYGT/X+ghWkIx/nTD2H9+WNr5mVsMOvols7DfrKXqmEk 86WIn8HZMoe7hKk6UkLVPJYq+o6lCxyZ/Pqi0HGwo9QmQxkp31o4bHdg1239+Y/5yabAz2 2tqsgKA4P+T7dryPZVnJRXaqPgbCt3x+yl/S6e3QLltY3pgU4f1ZjhI2wOdkPGGu3Nim/H TDYwiQ6qApq5oW5O7aqGJo3r1ZpA4zELqNn6/19PVgmNweA/SHujBlQYoD9lbX5e5i6VS5 S0gzOZdAOJlIK+bzNaW31F6isfdCBl3H9NM8QT+p+e18f0IPTxM+sY3DzBHvbw== Date: Thu, 8 Jan 2026 03:52:17 +0100 To: FFmpeg development discussions and patches Message-ID: References: <176763314293.25.8417260284875775060@4457048688e7> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddutdegkedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttdejnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeffheevhfdvvdfhtdfgtefhtdeuleeftdevkeffleejtefhgedthfefgffgueeftdenucffohhmrghinhepfhhfmhhpvghgrdhorhhgnecukfhppeeguddrieeirdeiiedrhedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieeirdehtddphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhqihgupedtkedvgedugeefhfduvedpmhhouggvpehsmhhtphhouhhtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh Message-ID-Hash: JX4DRM63XIDUX3TOWQMNUELLGJD7YESC X-Message-ID-Hash: JX4DRM63XIDUX3TOWQMNUELLGJD7YESC X-MailFrom: SRS0=puFR=7N=niedermayer.cc=michael@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] Re: [PR] avformat/img2dec: Check avio_size() for failure (PR #21384) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michael Niedermayer via ffmpeg-devel Cc: Michael Niedermayer Content-Type: multipart/mixed; boundary="===============3481294200057417780==" Archived-At: List-Archive: List-Post: --===============3481294200057417780== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rdAVB8T/2KfnzHXk" Content-Disposition: inline --rdAVB8T/2KfnzHXk Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Kieran On Mon, Jan 05, 2026 at 10:38:29PM +0000, Kieran Kunhya via ffmpeg-devel wr= ote: > On Mon, Jan 5, 2026 at 5:12=E2=80=AFPM michaelni via ffmpeg-devel > wrote: > > > > PR #21384 opened by michaelni > > URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21384 > > Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21384.patch > > > > More complete fix for #YWH-PGM40646-32 > > > > Signed-off-by: Michael Niedermayer > > > > > > >From 1c214abfd52ac09cb5cb71de70e6475bb7f80747 Mon Sep 17 00:00:00 2001 > > From: Michael Niedermayer > > Date: Mon, 5 Jan 2026 18:07:49 +0100 > > Subject: [PATCH] avformat/img2dec: Check avio_size() for failure > > > > More complete fix for #YWH-PGM40646-32 > > > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/img2dec.c | 19 +++++++++---------- > > 1 file changed, 9 insertions(+), 10 deletions(-) > > > > diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c > > index 586634c0c3..523015e4c6 100644 > > --- a/libavformat/img2dec.c > > +++ b/libavformat/img2dec.c > > @@ -367,7 +367,6 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacke= t *pkt) > > int i, res; > > int ret[3] =3D { 0 }; > > int64_t size[3] =3D { 0 }; > > - int64_t total_size; > > AVIOContext *f[3] =3D { NULL }; > > AVCodecParameters *par =3D s1->streams[0]->codecpar; > > > > @@ -458,15 +457,15 @@ int ff_img_read_packet(AVFormatContext *s1, AVPac= ket *pkt) > > } > > } > > > > - total_size =3D size[0]; > > - if (total_size > INT64_MAX - size[1]) > > - return AVERROR_INVALIDDATA; > > - total_size +=3D size[1]; > > - if (total_size > INT64_MAX - size[2]) > > - return AVERROR_INVALIDDATA; > > - total_size +=3D size[2]; > > - if (total_size > INT_MAX) > > - return AVERROR_INVALIDDATA; > > + int64_t total_size =3D 0; > > + for(int i =3D 0; i < 3; i++) { > > + if (size[i] < 0) > > + return size[i]; > > + if (total_size > INT64_MAX - size[i]) > > + return AVERROR_INVALIDDATA; > > + > > + total_size +=3D size[i]; > > + } >=20 > Check for (total_size > INT_MAX) is gone now, is that intentional? no thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Complexity theory is the science of finding the exact solution to an approximation. Benchmarking OTOH is finding an approximation of the exact --rdAVB8T/2KfnzHXk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaV8b3QAKCRBhHseHBAsP qzzUAKCG+gS7c+cZnLFBBuHtygLJrkFqYwCfX7yv1RNm19IylM0CjkK/CRMHTjg= =1xBG -----END PGP SIGNATURE----- --rdAVB8T/2KfnzHXk-- --===============3481294200057417780== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org --===============3481294200057417780==--