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.
> 
> Signed-off-by: Marton Balint <c...@passwd.hu>
> ---
>  libavformat/electronicarts.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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, AVPacket 
> *pkt)
>      int av_uninit(num_samples);
>  
>      while ((!packet_read && !hit_end) || partial_packet) {
> +        chunk_type = avio_rl32(pb);
>          if (avio_feof(pb))
>              return AVERROR_EOF;
> -        chunk_type = avio_rl32(pb);
>          chunk_size = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb);
>          if (chunk_size < 8)
>              return AVERROR_INVALIDDATA;
> -- 
> 2.35.3

lgtm

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to