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/vp9_superframe_bsf: Check in size
@ 2022-03-21 20:19 Michael Niedermayer
  2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 2/5] avcodec/allcodecs: Dont play with NULLs Michael Niedermayer
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Michael Niedermayer @ 2022-03-21 20:19 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Fixes: Out of array read
Fixes: 45722/clusterfuzz-testcase-minimized-ffmpeg_BSF_VP9_SUPERFRAME_fuzzer-5173378975137792

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

diff --git a/libavcodec/vp9_superframe_bsf.c b/libavcodec/vp9_superframe_bsf.c
index 57681e29e4..bed9fd4ba2 100644
--- a/libavcodec/vp9_superframe_bsf.c
+++ b/libavcodec/vp9_superframe_bsf.c
@@ -108,7 +108,7 @@ static int vp9_superframe_filter(AVBSFContext *ctx, AVPacket *pkt)
     if (res < 0)
         return res;
 
-    marker = pkt->data[pkt->size - 1];
+    marker = pkt->size ? pkt->data[pkt->size - 1] : 0;
     if ((marker & 0xe0) == 0xc0) {
         int nbytes = 1 + ((marker >> 3) & 0x3);
         int n_frames = 1 + (marker & 0x7), idx_sz = 2 + n_frames * nbytes;
-- 
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] 13+ messages in thread

end of thread, other threads:[~2022-04-03 21:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 20:19 [FFmpeg-devel] [PATCH 1/5] avcodec/vp9_superframe_bsf: Check in size Michael Niedermayer
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 2/5] avcodec/allcodecs: Dont play with NULLs Michael Niedermayer
2022-03-21 20:33   ` James Almer
2022-03-21 20:55     ` Andreas Rheinhardt
2022-03-21 20:48   ` Andreas Rheinhardt
2022-03-21 21:03     ` Michael Niedermayer
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 3/5] avcodec/vmdaudio: Fix channels count bug Michael Niedermayer
2022-03-28 18:07   ` Michael Niedermayer
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 4/5] avcodec/diracdec: avoid signed integer overflow in global mv Michael Niedermayer
2022-04-03 21:22   ` Michael Niedermayer
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 5/5] avcodec/exr: Avoid signed overflow in displayWindow Michael Niedermayer
2022-03-22 10:42   ` Paul B Mahol
2022-04-03 21:23     ` 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