[FFmpeg-devel] [PATCH] avcodec/ass_split: Fix null pointer dereference in ff_ass_style_get()
Michael Niedermayer
michael at niedermayer.cc
Wed Jan 20 16:22:27 CET 2016
On Wed, Jan 20, 2016 at 01:08:37AM +0100, Andreas Cadhalpun wrote:
> On 17.01.2016 15:55, Michael Niedermayer wrote:
> > From: Michael Niedermayer <michael at niedermayer.cc>
> >
> > Fixes: 55d71971da50365d542ed14b65565fe1/signal_sigsegv_4765a4_8499_f146af090a94f591d6254515c7700ef5.mkv
> >
> > Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> > libavcodec/ass_split.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c
> > index 9bc7b9d..f84a686 100644
> > --- a/libavcodec/ass_split.c
> > +++ b/libavcodec/ass_split.c
> > @@ -525,7 +525,7 @@ ASSStyle *ff_ass_style_get(ASSSplitContext *ctx, const char *style)
> > if (!style || !*style)
> > style = "Default";
> > for (i=0; i<ass->styles_count; i++)
> > - if (!strcmp(ass->styles[i].name, style))
> > + if (ass->styles[i].name && !strcmp(ass->styles[i].name, style))
> > return ass->styles + i;
> > return NULL;
> > }
> >
>
> Looks good to me.
applied
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160120/f15c1d77/attachment.sig>
More information about the ffmpeg-devel
mailing list