Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/5] avcodec/vmixdec: Check for end of input in decode_dcac()
@ 2023-07-23 18:02 Michael Niedermayer
  2023-07-23 18:03 ` [FFmpeg-devel] [PATCH 2/5] avcodec/mpeg4videodec: consider lowres in dest_pcm[] Michael Niedermayer
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Michael Niedermayer @ 2023-07-23 18:02 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Fixes: Timeout
Fixes: 59952/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VMIX_fuzzer-6718213736759296

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/vmixdec.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/vmixdec.c b/libavcodec/vmixdec.c
index b77c90929a..4cc5963e25 100644
--- a/libavcodec/vmixdec.c
+++ b/libavcodec/vmixdec.c
@@ -115,6 +115,8 @@ static int decode_dcac(AVCodecContext *avctx,
             if (dc_run > 0) {
                 dc_run--;
             } else {
+                if (get_bits_left(dc_gb) < 1)
+                    return AVERROR_INVALIDDATA;
                 dc_v = get_se_golomb_vmix(dc_gb);
                 dc += (unsigned)dc_v;
                 if (!dc_v)
@@ -127,6 +129,8 @@ static int decode_dcac(AVCodecContext *avctx,
                     continue;
                 }
 
+                if (get_bits_left(ac_gb) < 1)
+                    return AVERROR_INVALIDDATA;
                 ac_v = get_se_golomb_vmix(ac_gb);
                 i = scan[n];
                 block[i] = ((unsigned)ac_v * factors[i]) >> 4;
-- 
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".

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-09-07 22:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-23 18:02 [FFmpeg-devel] [PATCH 1/5] avcodec/vmixdec: Check for end of input in decode_dcac() Michael Niedermayer
2023-07-23 18:03 ` [FFmpeg-devel] [PATCH 2/5] avcodec/mpeg4videodec: consider lowres in dest_pcm[] Michael Niedermayer
2023-07-23 18:03 ` [FFmpeg-devel] [PATCH 3/5] avformat/imf_cpl: xmlNodeListGetString() can return NULL Michael Niedermayer
2023-07-23 19:55   ` Pierre-Anthony Lemieux
2023-07-23 21:21     ` Michael Niedermayer
2023-07-23 18:03 ` [FFmpeg-devel] [PATCH 4/5] avcodec/hevcdec: Fix undefined memcpy() Michael Niedermayer
2023-09-07 22:09   ` Michael Niedermayer
2023-07-23 18:03 ` [FFmpeg-devel] [PATCH 5/5] avcodec/h266_metadata_bsf: Check if there are CodedBitstreamFragment units Michael Niedermayer
2023-07-23 18:07   ` James Almer
2023-07-23 18:08     ` Michael Niedermayer
2023-09-07 22:12 ` [FFmpeg-devel] [PATCH 1/5] avcodec/vmixdec: Check for end of input in decode_dcac() Michael Niedermayer

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