[FFmpeg-cvslog] avcodec/ass_split: Fix null pointer dereference in ff_ass_style_get()

Michael Niedermayer git at videolan.org
Wed Jan 20 16:23:30 CET 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Jan 17 15:39:11 2016 +0100| [158f0545d81b2aca1c936490f80d13988616910e] | committer: Michael Niedermayer

avcodec/ass_split: Fix null pointer dereference in ff_ass_style_get()

Fixes: 55d71971da50365d542ed14b65565fe1/signal_sigsegv_4765a4_8499_f146af090a94f591d6254515c7700ef5.mkv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun at googlemail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=158f0545d81b2aca1c936490f80d13988616910e
---

 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;
 }



More information about the ffmpeg-cvslog mailing list