[FFmpeg-cvslog] avcodec/vvc/vvcdec: Do not submit frames without VVCFrameThread
Michael Niedermayer
git at videolan.org
Wed Apr 3 15:44:16 EEST 2024
ffmpeg | branch: release/7.0 | Michael Niedermayer <michael at niedermayer.cc> | Fri Jan 26 19:58:56 2024 +0100| [e37d66a72edb6d3efae31f4757c6a08f33e642df] | committer: Michael Niedermayer
avcodec/vvc/vvcdec: Do not submit frames without VVCFrameThread
Such frames will crash when pthread functions are called on the NULL pointer
Fixes: member access within null pointer of type 'VVCFrameThread' (aka 'struct VVCFrameThread')
Fixes: 65160/clusterfuzz-testcase-minimized-ffmpeg_BSF_VVC_METADATA_fuzzer-4665241535119360 (partly)
Fixes: 65636/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-5394745824182272
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 84ce5ced3163975b5ba9ffbf4c4709114b9e8669)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e37d66a72edb6d3efae31f4757c6a08f33e642df
---
libavcodec/vvc/vvcdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/vvc/vvcdec.c b/libavcodec/vvc/vvcdec.c
index d5704aca25..e72bb48a50 100644
--- a/libavcodec/vvc/vvcdec.c
+++ b/libavcodec/vvc/vvcdec.c
@@ -939,6 +939,9 @@ static int vvc_decode_frame(AVCodecContext *avctx, AVFrame *output,
if (ret < 0)
return ret;
+ if (!fc->ft)
+ return avpkt->size;
+
ret = submit_frame(s, fc, output, got_output);
if (ret < 0)
return ret;
More information about the ffmpeg-cvslog
mailing list