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 DE5EF409E8 for ; Wed, 2 Feb 2022 07:52:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7949268B11F; Wed, 2 Feb 2022 09:52:26 +0200 (EET) Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2C03068AD96 for ; Wed, 2 Feb 2022 09:52:19 +0200 (EET) Received: from cc976dd952578dabee563e248880c159 ([1.136.209.60]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id 2127q7qb029286 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for ; Wed, 2 Feb 2022 07:52:11 GMT Date: Wed, 2 Feb 2022 18:52:03 +1100 From: Peter Ross To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches References: MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] avformat/img2dec: fix logic error in GEM Raster file probe 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="===============4513825295312633607==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4513825295312633607== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="slgQJHOuXrasYZUE" Content-Disposition: inline --slgQJHOuXrasYZUE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 21, 2022 at 09:14:05AM +1100, Peter Ross wrote: > Use correct logic to express limits of the planes and pattern_size fields. >=20 > Fix ticket# 9605 >=20 > Signed-off-by: Peter Ross > --- > libavformat/img2dec.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c > index 4d5ac51b53..2583ca2465 100644 > --- a/libavformat/img2dec.c > +++ b/libavformat/img2dec.c > @@ -1115,8 +1115,8 @@ static int gem_probe(const AVProbeData *p) > int ret =3D 0; > if ( AV_RB16(b ) >=3D 1 && AV_RB16(b ) <=3D 3 && > AV_RB16(b + 2) >=3D 8 && AV_RB16(b + 2) <=3D 779 && > - (AV_RB16(b + 4) > 0 || AV_RB16(b + 4) <=3D 8) && > - (AV_RB16(b + 6) > 0 || AV_RB16(b + 6) <=3D 8) && > + (AV_RB16(b + 4) > 0 && AV_RB16(b + 4) <=3D 32) && /* planes */ > + (AV_RB16(b + 6) > 0 && AV_RB16(b + 6) <=3D 8) && /* pattern_si= ze */ > AV_RB16(b + 8) && > AV_RB16(b + 10) && > AV_RB16(b + 12) && > --=20 > 2.34.1 will apply in a couple of days -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) --slgQJHOuXrasYZUE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSpB+AvpuUM0jTNINJnYHnFrEDdawUCYfo4IAAKCRBnYHnFrEDd a34sAJ0S3Qe3OQ8/AjtdEgLSAF5yQ00/6gCdELxGqesmYgwLIQTqyIVkAHbs04I= =u9eE -----END PGP SIGNATURE----- --slgQJHOuXrasYZUE-- --===============4513825295312633607== 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". --===============4513825295312633607==--