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

Michael Niedermayer git at videolan.org
Thu Jan 28 16:11:43 CET 2016


ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Sun Jan 17 15:39:11 2016 +0100| [c6f6829ce6e0e3dd7d5d6f084bc8437e84ec7ee5] | 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>
(cherry picked from commit 158f0545d81b2aca1c936490f80d13988616910e)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 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