From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 996544E118 for ; Sat, 8 Mar 2025 19:11:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C731A68DD91; Sat, 8 Mar 2025 21:11:29 +0200 (EET) 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 A6ABB68DC60 for ; Sat, 8 Mar 2025 21:11:23 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id E7055442E0 for ; Sat, 8 Mar 2025 19:11:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1741461083; 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=5icYTvQr/QvgEGA+ZiZgokHMNuuY58YBymRfgPl722Y=; b=MJF9ekKkinB3O3FVhxCtBEkT1j53m+eizPV/mAjFUouCnCKP+k3gIK/pO6nKxvuUyKFIuC Vg06Fu+EkFPJUKSEt4H0n4lJJ4L8vqgIUVz82jycrEhiYu8xXsEKZgHZSvYiJj5MYo5D+b sSRxa/Im1ixKF16Pko9+ZEXppPkStiadz3pDRnmvHQV6auFObcxMcKviG+hNJUbh+WHAhf rV6j7t3FSpqDVnFXJunqSiiLkxUXFLQymzbUkKCojKVe0gvNTDx9XsvHw7huVF5K/pp+Tq XF92lJJtaGoALb3sXT8VEr0f8s1P6JGN6ztiqkTTKJIRa54z9ILY5Sj4hIGZig== Date: Sat, 8 Mar 2025 20:11:22 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250308191122.GB4991@pb2> References: <20250304170719.602196-1-manuel.lauss@gmail.com> <20250304170719.602196-2-manuel.lauss@gmail.com> MIME-Version: 1.0 In-Reply-To: <20250304170719.602196-2-manuel.lauss@gmail.com> X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduudegfeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeeigeektdejudffjefhteegjedtgeettefggedthfejgfevhfetgeekjedtvdfhveenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH v4 2/3] avcodec/sanm: fobj left/top are signed 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 Content-Type: multipart/mixed; boundary="===============8191453387667935470==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8191453387667935470== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0Hna4joYoBob3Fqb" Content-Disposition: inline --0Hna4joYoBob3Fqb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Manuel On Tue, Mar 04, 2025 at 06:07:18PM +0100, Manuel Lauss wrote: > The left and top parameters of an FOBJ are signed values. >=20 > Signed-off-by: Manuel Lauss > --- > v4: revert v3, it arose due to a misunderstanding > v3: change the bytestream accessor to signed too > v2: no changes > libavcodec/sanm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c > index a4f0a28c7c..71dbac4320 100644 > --- a/libavcodec/sanm.c > +++ b/libavcodec/sanm.c > @@ -1238,8 +1238,8 @@ static int old_codec48(SANMVideoContext *ctx, int w= idth, int height) > static int process_frame_obj(SANMVideoContext *ctx) > { > uint16_t codec =3D bytestream2_get_le16u(&ctx->gb); > - uint16_t left =3D bytestream2_get_le16u(&ctx->gb); > - uint16_t top =3D bytestream2_get_le16u(&ctx->gb); > + int16_t left =3D bytestream2_get_le16u(&ctx->gb); > + int16_t top =3D bytestream2_get_le16u(&ctx->gb); > uint16_t w =3D bytestream2_get_le16u(&ctx->gb); > uint16_t h =3D bytestream2_get_le16u(&ctx->gb); Does the following code also handle all error conditions that negative left/top could now trigger ? thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is dangerous to be right in matters on which the established authorities are wrong. -- Voltaire --0Hna4joYoBob3Fqb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZ8yWVwAKCRBhHseHBAsP q/QFAJ9JsW2Gawis6Np68GG/n+B7rGiOlACfejDc+pZB9BCbAjCNTxREez6y9P8= =etv1 -----END PGP SIGNATURE----- --0Hna4joYoBob3Fqb-- --===============8191453387667935470== 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 https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============8191453387667935470==--