[FFmpeg-devel] [PATCH 2/5] avformat/usmdec: do not return 0 when no packet was produced
Michael Niedermayer
michael at niedermayer.cc
Mon Oct 16 02:10:43 EEST 2023
On Tue, Oct 10, 2023 at 01:24:23PM +0200, Anton Khirnov wrote:
> Quoting Michael Niedermayer (2023-10-05 21:44:37)
> > Fixes: Assertion pkt->stream_index < (unsigned)s->nb_streams && "Invalid stream index.\n" failed at libavformat/demux.c:617
> > Fixes: 62498/clusterfuzz-testcase-minimized-ffmpeg_dem_USM_fuzzer-4734740995112960
> >
> > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> > libavformat/usmdec.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavformat/usmdec.c b/libavformat/usmdec.c
> > index 1665eb8e551..b0079a1230c 100644
> > --- a/libavformat/usmdec.c
> > +++ b/libavformat/usmdec.c
> > @@ -361,7 +361,7 @@ static int64_t parse_chunk(AVFormatContext *s, AVIOContext *pb,
> > ret = avio_skip(pb, FFMAX(0, chunk_size - (ret - chunk_start)));
> > if (ret < 0)
> > return ret;
> > - return 0;
> > + return AVERROR(EAGAIN);
>
> I believe that should be FFERROR_REDO instead.
will use FFERROR_REDO instead.
will also apply the rest of the patch
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Does the universe only have a finite lifespan? No, its going to go on
forever, its just that you wont like living in it. -- Hiranya Peiri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20231016/a2dd0893/attachment.sig>
More information about the ffmpeg-devel
mailing list