From: Michael Niedermayer <michael@niedermayer.cc> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 4/4] avcodec/speedhq: Check width Date: Sun, 28 Aug 2022 19:39:53 +0200 Message-ID: <20220828173953.GB2088045@pb2> (raw) In-Reply-To: <20220821142309.GI2088045@pb2> [-- Attachment #1.1: Type: text/plain, Size: 1888 bytes --] On Sun, Aug 21, 2022 at 04:23:09PM +0200, Michael Niedermayer wrote: > On Sun, Aug 21, 2022 at 12:54:57PM +0200, Paul B Mahol wrote: > > 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? > > We can increase the buffer size or change how the %8 != 0 case is handled > WIthout a non fuzzed file with such dimensions, I do not know what the > correct handling of such a file is. > What do you prefer to be done ? ping [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The bravest are surely those who have the clearest vision of what is before them, glory and danger alike, and yet notwithstanding go out to meet it. -- Thucydides [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ 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-28 17:40 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 2022-08-21 14:23 ` Michael Niedermayer 2022-08-28 17:39 ` Michael Niedermayer [this message] 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=20220828173953.GB2088045@pb2 \ --to=michael@niedermayer.cc \ --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