[FFmpeg-devel] [PATCH 1/5] avcodec/wbmpdec: use remaining size not whole size
Michael Niedermayer
michael at niedermayer.cc
Sun Jan 15 19:12:13 EET 2023
On Sun, Jan 15, 2023 at 01:44:09PM +1100, Peter Ross wrote:
> On Fri, Jan 13, 2023 at 01:01:34AM +0100, Michael Niedermayer wrote:
> > Fixes: out of array access
> > Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WBMP_fuzzer-6652634692190208
> > Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WBMP_fuzzer-6653703453278208
> > Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WBMP_fuzzer-6668020758216704
> > Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WBMP_fuzzer-6684749875249152
> >
> > 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/wbmpdec.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/wbmpdec.c b/libavcodec/wbmpdec.c
> > index 9638b55b94..8b105bc135 100644
> > --- a/libavcodec/wbmpdec.c
> > +++ b/libavcodec/wbmpdec.c
> > @@ -72,7 +72,7 @@ static int wbmp_decode_frame(AVCodecContext *avctx, AVFrame *p,
> > if (p->linesize[0] == (width + 7) / 8)
> > bytestream2_get_buffer(&gb, p->data[0], height * ((width + 7) / 8));
> > else
> > - readbits(p->data[0], width, height, p->linesize[0], gb.buffer, gb.buffer_end - gb.buffer_start);
> > + readbits(p->data[0], width, height, p->linesize[0], gb.buffer, gb.buffer_end - gb.buffer);
> >
> > p->key_frame = 1;
> > p->pict_type = AV_PICTURE_TYPE_I;
>
> please apply.
will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell
-------------- 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/20230115/2098e16e/attachment.sig>
More information about the ffmpeg-devel
mailing list