From: Peter Ross <pross@xvid.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 2/3] avcodec/vqcdec: Check width & 15
Date: Thu, 8 Dec 2022 18:32:40 +1100
Message-ID: <Y5GTGIqfvoa65Qo1@4eb231a0d1b36cedda43a2a005befe4d> (raw)
In-Reply-To: <20221127223435.8362-2-michael@niedermayer.cc>
[-- Attachment #1.1: Type: text/plain, Size: 1202 bytes --]
On Sun, Nov 27, 2022 at 11:34:34PM +0100, Michael Niedermayer wrote:
> Various parts of the code assume that width can be divided by various powers of 2
> without rounding
>
> Fixes: out of array access
> Fixes: 53623/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQC_fuzzer-6209269924233216
>
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libavcodec/vqcdec.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/libavcodec/vqcdec.c b/libavcodec/vqcdec.c
> index 18cd99462e..c3bce87974 100644
> --- a/libavcodec/vqcdec.c
> +++ b/libavcodec/vqcdec.c
> @@ -71,6 +71,9 @@ static av_cold int vqc_decode_init(AVCodecContext * avctx)
> static AVOnce init_static_once = AV_ONCE_INIT;
> VqcContext *s = avctx->priv_data;
>
> + if (avctx->width & 15)
> + return AVERROR_PATCHWELCOME;
> +
> s->vectors = av_malloc((avctx->width * avctx->height * 3) / 2);
> if (!s->vectors)
> return AVERROR(ENOMEM);
> --
> 2.17.1
ok. please apply.
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
[-- 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-12-08 7:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-27 22:34 [FFmpeg-devel] [PATCH 1/3] avcodec/mpeg12dec: Check input size Michael Niedermayer
2022-11-27 22:34 ` [FFmpeg-devel] [PATCH 2/3] avcodec/vqcdec: Check width & 15 Michael Niedermayer
2022-12-08 7:32 ` Peter Ross [this message]
2022-12-08 16:19 ` Michael Niedermayer
2022-11-27 22:34 ` [FFmpeg-devel] [PATCH 3/3] tools/target_dec_fuzzer: Adjust threshold for RSCC Michael Niedermayer
2022-11-30 23:07 ` Michael Niedermayer
2022-11-28 0:47 ` [FFmpeg-devel] [PATCH 1/3] avcodec/mpeg12dec: Check input size Kieran Kunhya
2022-11-28 21:33 ` 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=Y5GTGIqfvoa65Qo1@4eb231a0d1b36cedda43a2a005befe4d \
--to=pross@xvid.org \
--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