Fix a crash when parsing subtitles. From the man page of sscanf:
"the next pointer must be a pointer to character array that is long
enough to hold the input sequence and the terminating null byte"
Signed-off-by: Ilkka Ollakka <ileoo@videolan.org>
{
int i_result = VLC_EGENERIC;
char *psz_start, *psz_stop;
- psz_start = malloc( strlen(s) );
- psz_stop = malloc( strlen(s) );
+ psz_start = malloc( strlen(s) + 1 );
+ psz_stop = malloc( strlen(s) + 1 );
if( sscanf( s, "%s --> %s", psz_start, psz_stop) == 2 &&
subtitle_ParseSubRipTimingValue( &p_subtitle->i_start, psz_start ) == VLC_SUCCESS &&