[vlc-commits] jacosub: Fix format specifier
Hugo Beauzée-Luyssen
git at videolan.org
Tue Jan 30 13:12:55 CET 2018
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Jan 30 13:12:14 2018 +0100| [4bfa7204ae4fa3546813f6c9ed3a7d9d2cf6f58a] | committer: Hugo Beauzée-Luyssen
jacosub: Fix format specifier
%[] will always attempt to store a final 0, which doesn't fit here.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4bfa7204ae4fa3546813f6c9ed3a7d9d2cf6f58a
---
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 */
More information about the vlc-commits
mailing list