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 BE7FC44D01 for ; Thu, 17 Nov 2022 07:30:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 87AE468BA62; Thu, 17 Nov 2022 09:30:22 +0200 (EET) Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 95F3E68B0D6 for ; Thu, 17 Nov 2022 09:30:15 +0200 (EET) Received: from 4eb231a0d1b36cedda43a2a005befe4d ([1.152.242.82]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id 2AH7Tx87026333 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Thu, 17 Nov 2022 07:30:04 GMT Date: Thu, 17 Nov 2022 18:29:55 +1100 From: Peter Ross To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches , Marton Balint References: <20221113184441.1741-1-cus@passwd.hu> MIME-Version: 1.0 In-Reply-To: <20221113184441.1741-1-cus@passwd.hu> Subject: Re: [FFmpeg-devel] [PATCH 1/3] avformat/electronicarts: fix EOF check 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 Cc: Marton Balint Content-Type: multipart/mixed; boundary="===============4032276129437598239==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4032276129437598239== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0rJCpK1UzwW/4MdB" Content-Disposition: inline --0rJCpK1UzwW/4MdB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 13, 2022 at 07:44:39PM +0100, Marton Balint wrote: > Similar to feof(), avio_feof() is only true after an actual overread. >=20 > Signed-off-by: Marton Balint > --- > libavformat/electronicarts.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c > index e7f0cb9b9e..0a0d6249e8 100644 > --- a/libavformat/electronicarts.c > +++ b/libavformat/electronicarts.c > @@ -582,9 +582,9 @@ static int ea_read_packet(AVFormatContext *s, AVPacke= t *pkt) > int av_uninit(num_samples); > =20 > while ((!packet_read && !hit_end) || partial_packet) { > + chunk_type =3D avio_rl32(pb); > if (avio_feof(pb)) > return AVERROR_EOF; > - chunk_type =3D avio_rl32(pb); > chunk_size =3D ea->big_endian ? avio_rb32(pb) : avio_rl32(pb); > if (chunk_size < 8) > return AVERROR_INVALIDDATA; > --=20 > 2.35.3 lgtm -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) --0rJCpK1UzwW/4MdB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSpB+AvpuUM0jTNINJnYHnFrEDdawUCY3Xi7wAKCRBnYHnFrEDd a17PAKCF1pfyT9hS2r6T4fo3QinRSUj0dQCfc+Nl6vEvEtEb5L647nX+u1NXjyI= =A0HY -----END PGP SIGNATURE----- --0rJCpK1UzwW/4MdB-- --===============4032276129437598239== 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". --===============4032276129437598239==--