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 E61074AED2 for ; Fri, 18 Jul 2025 23:01:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id F0CD968DED8; Sat, 19 Jul 2025 02:01:30 +0300 (EEST) 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 AF41B68DB24 for ; Sat, 19 Jul 2025 02:01:24 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id E7A8141CFD for ; Fri, 18 Jul 2025 23:01:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1752879684; 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=DzdDGex0RYyjuiVTVpbdkx7qbHYETYp6ujWtYX3mxRc=; b=mwUF3o+2YKZbmSg0QwVAK15YlIKpjo8vUua06W4Ss2Tzv1AyKWPByeFil8TMm/3jSCXgqY +mfoU9U8917qHOzk5R+YWHrwHYu46mSkeAlWHBpE0o1SnD23cTUH5k/d1b712pvHMCxWu0 39KnaPJu8Q9i07YGB/K0tmCENrmargykw7w1ra5DvvEiFvYkSV/1ys1g3cZ9N9tTmNQdxN +cLXvNDcNMkzWRb3rrO+gtc4O4aBRBqmTY8dKEsxH1b/SEk+xjNYIsH+Y8pQV+9hxKAu1K eAUDu3bk85ANQxVCP+23mVzQlBErRkdxRfbd4M+5PFIgPvVk/OEOrXvYvHPYIA== Date: Sat, 19 Jul 2025 01:01:22 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250718230122.GN29660@pb2> References: <20250714221451.GQ29660@pb2> <20250715133310.1976-1-jamrial@gmail.com> MIME-Version: 1.0 In-Reply-To: <20250715133310.1976-1-jamrial@gmail.com> X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdeigeejfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepieegkedtjeduffejhfetgeejtdegteetgfegtdfhjefgvefhteegkeejtddvhfevnecukfhppeeguddrieeirdeihedrudejieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeihedrudejiedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] avcodec/motion_est: don't add offsets to NULL pointers 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="===============1869990507763247800==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============1869990507763247800== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Zo2ONpd4ll/f/0ht" Content-Disposition: inline --Zo2ONpd4ll/f/0ht Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 15, 2025 at 10:33:10AM -0300, James Almer wrote: > Fixes: libavcodec/motion_est.c:94:31: runtime error: applying zero offset= to null pointer > Signed-off-by: James Almer > --- > libavcodec/motion_est.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c > index 93be712cc0..3273451f9a 100644 > --- a/libavcodec/motion_est.c > +++ b/libavcodec/motion_est.c > @@ -91,12 +91,12 @@ static inline void init_ref(MotionEstContext *c, uint= 8_t *const src[3], > }; > int i; > for(i=3D0; i<3; i++){ > - c->src[0][i]=3D src [i] + offset[i]; > - c->ref[0][i]=3D ref [i] + offset[i]; > + c->src[0][i]=3D src[i] ? FF_PTR_ADD(src[i], offset[i]) : NULL; > + c->ref[0][i]=3D ref[i] ? FF_PTR_ADD(ref[i], offset[i]) : NULL; why does this need FF_PTR_ADD() when the pointer is not NULL ? patch is ok except that thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Give a rich man 100$ and he will turn it into 1000$. Give a poor man 1000$ and he will spend it. --Zo2ONpd4ll/f/0ht Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaHrSOAAKCRBhHseHBAsP q1jEAKCREX7sfk8ItvWmM5ui6qORkvi9zwCglfi4gSQQ+BIIwQ7vzMqKbgXXdXk= =xmk8 -----END PGP SIGNATURE----- --Zo2ONpd4ll/f/0ht-- --===============1869990507763247800== 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". --===============1869990507763247800==--