From c9bce0b8f8a485f11ce4f90356e9346036f14daf Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 13 Oct 2006 23:17:33 +0000 Subject: Changed strcpy() calls into strlcpy() calls, just to be extra safe. --- tls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tls.c') diff --git a/tls.c b/tls.c index 425d7019..719c8c59 100644 --- a/tls.c +++ b/tls.c @@ -74,7 +74,7 @@ static void list_file(const char *fname) buf.st_mode &= ~0777; buf.st_mtime = (time_t)0; buf.st_uid = buf.st_gid = 0; - strcpy(linkbuf, " -> "); + strlcpy(linkbuf, " -> ", sizeof linkbuf); /* const-cast required for silly UNICOS headers */ len = readlink((char *) fname, linkbuf+4, sizeof(linkbuf) - 4); if (len == -1) @@ -99,7 +99,7 @@ static void list_file(const char *fname) (int)mt->tm_min, (int)mt->tm_sec); } else { - strcpy(datebuf, " "); + strlcpy(datebuf, " ", sizeof datebuf); } /* TODO: Perhaps escape special characters in fname? */ -- cgit v1.2.3