[FFmpeg-cvslog] avcodec/ass_split: Fix null pointer dereference in ff_ass_style_get()
Michael Niedermayer
git at videolan.org
Mon Feb 1 20:41:40 CET 2016
ffmpeg | branch: release/2.5 | Michael Niedermayer <michael at niedermayer.cc> | Sun Jan 17 15:39:11 2016 +0100| [7ee0b1937a258e5251b0c1875e60be9a4aeff3ff] | 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=7ee0b1937a258e5251b0c1875e60be9a4aeff3ff
---
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 cc4f961..cdf4d84 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;
}
More information about the ffmpeg-cvslog
mailing list