# HG changeset patch # User reimar # Date 1141852396 0 # Node ID 1b42df5780e3eb1489fb8aca75dc3f40fc031e10 # Parent 58fff521d376a7e2388aafa2d9e8f8c64ad96b49 name array is too small, use strlcpy instead of strncpy diff -r 58fff521d376 -r 1b42df5780e3 libmpdemux/demux_ty.c --- a/libmpdemux/demux_ty.c Wed Mar 08 20:27:47 2006 +0000 +++ b/libmpdemux/demux_ty.c Wed Mar 08 21:13:16 2006 +0000 @@ -158,7 +158,7 @@ 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 @@ 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;