[MPlayer-cvslog] r24468 - trunk/libmpdemux/demux_ty.c
reimar
subversion at mplayerhq.hu
Fri Sep 14 18:12:02 CEST 2007
Author: reimar
Date: Fri Sep 14 18:12:02 2007
New Revision: 24468
Log:
Avoid strlcpy, tar headers already have space to ensure 0-termination
Modified:
trunk/libmpdemux/demux_ty.c
Modified: trunk/libmpdemux/demux_ty.c
==============================================================================
--- trunk/libmpdemux/demux_ty.c (original)
+++ trunk/libmpdemux/demux_ty.c Fri Sep 14 18:12:02 2007
@@ -136,8 +136,8 @@ static int ty_extensionis(const char *na
static int ty_tmf_filetoparts( demuxer_t *demux, TiVoInfo *tivo )
{
char header[ 512 ];
- char name[ 100 ];
- char sizestr[ 80 ];
+ char *name;
+ char *sizestr;
int size;
int count;
int blocks;
@@ -179,8 +179,10 @@ static int ty_tmf_filetoparts( demuxer_t
error = 1;
break;
}
- av_strlcpy( name, &header[ 0 ], 100 );
- av_strlcpy( sizestr, &header[ 124 ], 12 );
+ name = header;
+ name[99] = 0;
+ sizestr = &header[124];
+ sizestr[12] = 0;
size = strtol(sizestr, NULL, 8);
blocks = size / 512;
More information about the MPlayer-cvslog
mailing list