use strlcpy

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14932 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-04-24 19:54:58 +00:00
parent 3a1c2eb89d
commit d6b87a47d9
3 changed files with 7 additions and 7 deletions

View File

@@ -40,7 +40,7 @@ static char*
printable_time(time_t t)
{
static char s[128];
strcpy(s, ctime(&t)+ 4);
strlcpy(s, ctime(&t)+ 4, sizeof(s));
s[15] = 0;
return s;
}
@@ -49,7 +49,7 @@ static char*
printable_time_long(time_t t)
{
static char s[128];
strcpy(s, ctime(&t)+ 4);
strlcpy(s, ctime(&t)+ 4, sizeof(s));
s[20] = 0;
return s;
}