Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-10-29 18:10:59 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-11-10 23:14:22 +0300
commit024c5b4ab436b9e035517e4181dc3499e7095290 (patch)
tree0197d93236fc879b9af92f744f82a7bcd5bc1d3d
parent8e9631967427106468cfaf1d258ecddc06db39ff (diff)
avcodec/dts2pts_bsf: Check ctx for NULL before ff_cbs_flush()
Fixes: null pointer dereference Fixes: 52155/clusterfuzz-testcase-minimized-ffmpeg_BSF_DTS2PTS_fuzzer-5760107527143424 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/dts2pts_bsf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/dts2pts_bsf.c b/libavcodec/dts2pts_bsf.c
index bf20b1ec8a..8142562d2c 100644
--- a/libavcodec/dts2pts_bsf.c
+++ b/libavcodec/dts2pts_bsf.c
@@ -505,7 +505,8 @@ static void dts2pts_flush(AVBSFContext *ctx)
s->root = NULL;
ff_cbs_fragment_reset(&s->au);
- ff_cbs_flush(s->cbc);
+ if (s->cbc)
+ ff_cbs_flush(s->cbc);
}
static void dts2pts_close(AVBSFContext *ctx)