On Mon, Sep 21, 2020 at 12:32:14AM +0200, Paul B Mahol wrote:
> On Sun, Sep 20, 2020 at 10:26:07PM +0200, Michael Niedermayer wrote:
> > Fixes: signed integer overflow: 2 * 2132811776 cannot be represented in 
> > type 'int'
> > Fixes: 
> > 25722/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6221704077246464
> > 
> > Found-by: continuous fuzzing process 
> > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
> > ---
> >  libavformat/moflex.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/libavformat/moflex.c b/libavformat/moflex.c
> > index 2111157408..937f63cb63 100644
> > --- a/libavformat/moflex.c
> > +++ b/libavformat/moflex.c
> > @@ -62,6 +62,8 @@ static int pop_int(BitReader *br, AVIOContext *pb, int n)
> >  
> >          if (ret < 0)
> >              return ret;
> > +        if (ret > INT_MAX - value - value)
> > +            return AVERROR_INVALIDDATA;
> >          value = 2 * value + ret;
> 
> Generally acceptable.

will apply

thx

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

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.

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