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 ESMTP id BD4B2449D8 for ; Wed, 28 Sep 2022 19:39:38 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2CD5168BC02; Wed, 28 Sep 2022 22:39:35 +0300 (EEST) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1BF9F68BB66 for ; Wed, 28 Sep 2022 22:39:28 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id D66BBE000F for ; Wed, 28 Sep 2022 19:39:26 +0000 (UTC) Date: Wed, 28 Sep 2022 21:39:25 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220928193925.GZ6583@pb2> References: MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] swscale/swscale_unscaled: Fix undefined NULL + 0 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="===============7124676956414850509==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7124676956414850509== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JVTyp1F/hrbhzAAs" Content-Disposition: inline --JVTyp1F/hrbhzAAs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 28, 2022 at 08:39:09PM +0200, Andreas Rheinhardt wrote: > Affected the fitsdec-gbrp16 FATE-test. >=20 > Signed-off-by: Andreas Rheinhardt > --- > libswscale/swscale_unscaled.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c > index 8838cc8b53..0b97377934 100644 > --- a/libswscale/swscale_unscaled.c > +++ b/libswscale/swscale_unscaled.c > @@ -695,7 +695,7 @@ static void packed16togbra16(const uint8_t *src, int = srcStride, > } > } > for (i =3D 0; i < 4; i++) > - dst[i] +=3D dstStride[i] >> 1; > + dst[i] =3D FF_PTR_ADD(dst[i], dstStride[i] >> 1); > } > } > =20 > @@ -729,8 +729,8 @@ static int Rgb16ToPlanarRgb16Wrapper(SwsContext *c, c= onst uint8_t *src[], > } > =20 > for(i=3D0; i<4; i++) { > - dst2013[i] +=3D stride2013[i] * srcSliceY / 2; > - dst1023[i] +=3D stride1023[i] * srcSliceY / 2; > + dst2013[i] =3D FF_PTR_ADD(dst2013[i], stride2013[i] * srcSliceY = / 2); > + dst1023[i] =3D FF_PTR_ADD(dst1023[i], stride1023[i] * srcSliceY = / 2); > } is there a reason not to check the pointer in the loop ? as in for (i =3D 0; i < 4 && dst[i]; i++) thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB "Nothing to hide" only works if the folks in power share the values of you and everyone you know entirely and always will -- Tom Scott --JVTyp1F/hrbhzAAs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYzSi6QAKCRBhHseHBAsP qxEFAJ9RUZsrZuDndxYhWLGAYDHoW4c+eACgkFVpGaE54f/Yp8HJNpu4XRRmW5M= =vxVy -----END PGP SIGNATURE----- --JVTyp1F/hrbhzAAs-- --===============7124676956414850509== 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". --===============7124676956414850509==--