[FFmpeg-devel] [PATCH 2/2] libavformat/takdec.c: Fix msan error.
Thierry Foucu
tfoucu at gmail.com
Mon Apr 21 20:40:40 EEST 2025
On Mon, Apr 21, 2025 at 10:01 AM Nicolas George <george at nsup.org> wrote:
> Thierry Foucu (HE12025-04-21):
> > > >> - avio_read(pb, md5, 16);
> > > >> + if (avio_read(pb, md5, 16) != 16) {
> > > >> + return AVERROR(EIO);
> > > Should be AVERROR_INVALIDDATA imo, since i means the file is just
> > > truncated. It wasn't an error in the protocol reading data.
> > Regarding the error message, I was trying to be consistent with the other
> > avio_read error, like here:
> > https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/takdec.c#L99
>
> Both codes are wrong: if avio_read() returns an error, it must be
> returned as is, not a new error invented.
>
> And if avio_read() returns less than requested, then I agree with James,
> INVALID_DATA is more correct than EIO. In both places.
>
Thanks. This is good to know..
>
> Regards,
>
> --
> Nicolas George
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
--
Thierry Foucu
More information about the ffmpeg-devel
mailing list