Commit 4cfc4e98 authored by Rémi Duraffort's avatar Rémi Duraffort Committed by Felix Paul Kühne

vcd: fix off-by-one while scanning

scanf("%Ns", %buffer) require the buffer to be N+1 long.
(cherry picked from commit da89d251fc076b1df3b0d8ba5987e16371a1a59a)
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 40cb29d9
...@@ -819,7 +819,7 @@ static int OpenVCDImage( vlc_object_t * p_this, const char *psz_dev, ...@@ -819,7 +819,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