[FFmpeg-devel] [PATCH 2/2] avcodec/mobiclip: set the bitstream size to the input
Michael Niedermayer
michael at niedermayer.cc
Thu Oct 15 23:40:05 EEST 2020
On Sat, Sep 12, 2020 at 04:51:04PM +0200, Paul B Mahol wrote:
> On Sat, Sep 12, 2020 at 04:35:55PM +0200, Michael Niedermayer wrote:
> > Fixes: out of array read
> > Fixes: 25453/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOBICLIP_fuzzer-5163575973511168
> >
> > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> > libavcodec/mobiclip.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c
> > index 3ede370bef..08a35218cc 100644
> > --- a/libavcodec/mobiclip.c
> > +++ b/libavcodec/mobiclip.c
> > @@ -1306,7 +1306,7 @@ static int mobiclip_decode(AVCodecContext *avctx, void *data,
> > (uint16_t *)pkt->data,
> > (pkt->size + 1) >> 1);
> >
> > - ret = init_get_bits8(gb, s->bitstream, s->bitstream_size);
> > + ret = init_get_bits8(gb, s->bitstream, FFALIGN(pkt->size, 2));
> > if (ret < 0)
> > return ret;
>
> ok.
will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- 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/20201015/18b858a6/attachment.sig>
More information about the ffmpeg-devel
mailing list