1
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 06:03:45 +01:00

name array is too small, use strlcpy instead of strncpy

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17785 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-03-08 21:13:16 +00:00
parent 1f5b55cb9b
commit 08394d0e01

View File

@ -158,7 +158,7 @@ int ty_extensionis( char *name, char *ext )
int ty_tmf_filetoparts( demuxer_t *demux, TiVoInfo *tivo )
{
char header[ 512 ];
char name[ 80 ];
char name[ 100 ];
char sizestr[ 80 ];
int size;
int count;
@ -201,8 +201,8 @@ int ty_tmf_filetoparts( demuxer_t *demux, TiVoInfo *tivo )
error = 1;
break;
}
strncpy( name, &header[ 0 ], 100 );
strncpy( sizestr, &header[ 124 ], 12 );
strlcpy( name, &header[ 0 ], 100 );
strlcpy( sizestr, &header[ 124 ], 12 );
size = ty_octaltodecimal( sizestr );
blocks = size / 512;