From 4bfa7204ae4fa3546813f6c9ed3a7d9d2cf6f58a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hugo=20Beauz=C3=A9e-Luyssen?= Date: Tue, 30 Jan 2018 13:12:14 +0100 Subject: [PATCH] jacosub: Fix format specifier %[] will always attempt to store a final 0, which doesn't fit here. --- modules/demux/subtitle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c index f5320e6ca6..3d7f2faf8a 100644 --- a/modules/demux/subtitle.c +++ b/modules/demux/subtitle.c @@ -2424,7 +2424,8 @@ static int ParseSCC( vlc_object_t *p_obj, subs_properties_t *p_props, unsigned h, m, s, f; char c; - if( sscanf( psz_line, "%u:%u:%u%[:;]%u ", &h, &m, &s, &c, &f ) != 5 ) + if( sscanf( psz_line, "%u:%u:%u%c%u ", &h, &m, &s, &c, &f ) != 5 || + ( c != ':' && c != ';' ) ) continue; /* convert everything to seconds */ -- 2.11.4.GIT