diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-17 15:39:11 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-31 00:24:28 +0100 |
commit | 0b70b546a2261dd131c7e2d3a94f6feed04bf8a7 (patch) | |
tree | ad03b1b274c033778a7ae92cb0867689855914af | |
parent | 1733981ec3ac8d3631be29c137797c043e1d87e5 (diff) | |
download | ffmpeg-0b70b546a2261dd131c7e2d3a94f6feed04bf8a7.tar.gz |
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@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 158f0545d81b2aca1c936490f80d13988616910e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/ass_split.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c index 2458cb9225..5b6d7af1d1 100644 --- a/libavcodec/ass_split.c +++ b/libavcodec/ass_split.c @@ -523,7 +523,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; } |