[FFmpeg-devel] [PATCH 1/4] avcodec/dts2pts_bsf: Check ctx for NULL before ff_cbs_flush()
Michael Niedermayer
michael at niedermayer.cc
Thu Nov 10 00:03:26 EET 2022
On Sun, Nov 06, 2022 at 07:38:42PM -0300, James Almer wrote:
> 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.
will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20221109/b6b90c6c/attachment.sig>
More information about the ffmpeg-devel
mailing list