Commit da89d251 authored by Rémi Duraffort's avatar Rémi Duraffort

vcd: fix off-by-one while scanning

scanf("%Ns", %buffer) require the buffer to be N+1 long.
parent 396a1e89
...@@ -802,7 +802,7 @@ static int OpenVCDImage( vlc_object_t * p_this, const char *psz_dev, ...@@ -802,7 +802,7 @@ static int OpenVCDImage( vlc_object_t * p_this, const char *psz_dev,
while( fgets( line, 1024, cuefile ) && i_tracks < INT_MAX-1 ) while( fgets( line, 1024, cuefile ) && i_tracks < INT_MAX-1 )
{ {
/* look for a TRACK line */ /* look for a TRACK line */
char psz_dummy[9]; char psz_dummy[10];
if( !sscanf( line, "%9s", psz_dummy ) || strcmp(psz_dummy, "TRACK") ) if( !sscanf( line, "%9s", psz_dummy ) || strcmp(psz_dummy, "TRACK") )
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment