[FFmpeg-devel] [PATCH 6/8] avformat/vividas: Fix another infinite loop

Michael Niedermayer michael at niedermayer.cc
Sun Aug 11 18:15:15 EEST 2019


On Sun, Aug 11, 2019 at 11:04:12AM +0200, Paul B Mahol wrote:
> On Sat, Aug 10, 2019 at 11:17 PM Michael Niedermayer <michael at niedermayer.cc>
> wrote:
> 
> > Not found by the fuzzer
> >
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> >  libavformat/vividas.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavformat/vividas.c b/libavformat/vividas.c
> > index a5f33181de..0c33ca2da8 100644
> > --- a/libavformat/vividas.c
> > +++ b/libavformat/vividas.c
> > @@ -546,7 +546,7 @@ static int viv_read_header(AVFormatContext *s)
> >              break;
> >
> >          block_len = ffio_read_varlen(pb);
> > -        if (avio_feof(pb))
> > +        if (avio_feof(pb) || block_len <= 0)
> >              return AVERROR_INVALIDDATA;
> >
> >
> LGTM

will apply

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190811/ba9bb1d1/attachment.sig>


More information about the ffmpeg-devel mailing list