[FFmpeg-devel] [PATCH 1/4] avcodec/dts2pts_bsf: Check ctx for NULL before ff_cbs_flush()
James Almer
jamrial at gmail.com
Mon Nov 7 00:38:42 EET 2022
On 11/5/2022 5:16 PM, Michael Niedermayer wrote:
> 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
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
> libavcodec/dts2pts_bsf.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> 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)
Should be ok.
More information about the ffmpeg-devel
mailing list