diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-04-17 02:22:57 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-04-17 02:22:57 +0000 |
commit | f68593d2ce69e6761dc27dc410c13f7afc2883c3 (patch) | |
tree | 46458b11d00460bfe3f50c94173a1a504fd97dba /usr.bin/vi/cl | |
parent | 88b8ad8fed12e0334a6d4109fe3d40bf19651fe9 (diff) |
eliminate strcpy/sprintf. reviewed by deraadt and millert.
Diffstat (limited to 'usr.bin/vi/cl')
-rw-r--r-- | usr.bin/vi/cl/cl_bsd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/vi/cl/cl_bsd.c b/usr.bin/vi/cl/cl_bsd.c index 73d9e2dd486..cdf22ce1eb0 100644 --- a/usr.bin/vi/cl/cl_bsd.c +++ b/usr.bin/vi/cl/cl_bsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cl_bsd.c,v 1.7 2002/02/16 21:27:56 millert Exp $ */ +/* $OpenBSD: cl_bsd.c,v 1.8 2003/04/17 02:22:56 itojun Exp $ */ /*- * Copyright (c) 1995, 1996 @@ -317,7 +317,7 @@ tigetstr(name) p = sbuf; #ifdef _AIX - return ((p = tgetstr(name, &p)) == NULL ? (char *)-1 : strcpy(sbuf, p)); + return ((p = tgetstr(name, &p)) == NULL ? (char *)-1 : (strlcpy(sbuf, p, sizeof(sbuf)), sbuf)); #else return (tgetstr(name, &p) == NULL ? (char *)-1 : sbuf); #endif |