From: Paul B Mahol <onemda@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 4/4] avcodec/speedhq: Check width Date: Sun, 21 Aug 2022 12:54:57 +0200 Message-ID: <CAPYw7P7A+m0b4s3rRmkK3G3cCXDeOTgcxEFpNQ_HKeHZAUTYYw@mail.gmail.com> (raw) In-Reply-To: <20220818223535.13078-4-michael@niedermayer.cc> On Fri, Aug 19, 2022 at 12:36 AM Michael Niedermayer <michael@niedermayer.cc> wrote: > Fixes: out of array access > Fixes: > 50014/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SPEEDHQ_fuzzer-4748914632294400 > > Alternatively the buffer size can be increased > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by > <https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by>: > Michael Niedermayer <michael@niedermayer.cc> > --- > libavcodec/speedhq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c > index c43de4f199..ffee5f973b 100644 > --- a/libavcodec/speedhq.c > +++ b/libavcodec/speedhq.c > @@ -499,7 +499,7 @@ static int speedhq_decode_frame(AVCodecContext *avctx, > AVFrame *frame, > uint32_t second_field_offset; > int ret; > > - if (buf_size < 4 || avctx->width < 8) > + if (buf_size < 4 || avctx->width < 8 || avctx->width % 8 != 0) > return AVERROR_INVALIDDATA; > Is this right thing to do? > > quality = buf[0]; > -- > 2.17.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-08-21 10:52 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-18 22:35 [FFmpeg-devel] [PATCH 1/4] avcodec/bethsoftvideo: Pass GetByteContext into set_palette() Michael Niedermayer 2022-08-18 22:35 ` [FFmpeg-devel] [PATCH 2/4] avcodec/bethsoftvideo: Check block_type before frame alloc Michael Niedermayer 2022-08-28 17:40 ` Michael Niedermayer 2022-08-18 22:35 ` [FFmpeg-devel] [PATCH 3/4] tools/target_dec_fuzzer: Adjust threshold for bethsoftvid Michael Niedermayer 2022-08-28 17:41 ` Michael Niedermayer 2022-08-18 22:35 ` [FFmpeg-devel] [PATCH 4/4] avcodec/speedhq: Check width Michael Niedermayer 2022-08-21 10:54 ` Paul B Mahol [this message] 2022-08-21 14:23 ` Michael Niedermayer 2022-08-28 17:39 ` Michael Niedermayer 2022-09-02 9:02 ` Michael Niedermayer 2022-08-28 17:41 ` [FFmpeg-devel] [PATCH 1/4] avcodec/bethsoftvideo: Pass GetByteContext into set_palette() Michael Niedermayer
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAPYw7P7A+m0b4s3rRmkK3G3cCXDeOTgcxEFpNQ_HKeHZAUTYYw@mail.gmail.com \ --to=onemda@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git