diff options
author | 2007-02-07 17:54:42 +0000 | |
---|---|---|
committer | 2007-02-07 17:54:42 +0000 | |
commit | 32b9d9b60eebfd711744391ff88f95e1e4e2909b (patch) | |
tree | 9c7f50f136886d0f5177e79c3178a5f015a16a42 | |
parent | Several improvements to the usb client code. Still not working. (diff) | |
download | wireguard-openbsd-32b9d9b60eebfd711744391ff88f95e1e4e2909b.tar.xz wireguard-openbsd-32b9d9b60eebfd711744391ff88f95e1e4e2909b.zip |
strl* overload; use xsnprintf(); OK ray@.
-rw-r--r-- | usr.bin/cvs/root.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.bin/cvs/root.c b/usr.bin/cvs/root.c index 502f773031e..20b0f51f92f 100644 --- a/usr.bin/cvs/root.c +++ b/usr.bin/cvs/root.c @@ -1,4 +1,4 @@ -/* $OpenBSD: root.c,v 1.34 2007/01/18 22:52:23 niallo Exp $ */ +/* $OpenBSD: root.c,v 1.35 2007/02/07 17:54:42 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -229,13 +229,7 @@ cvsroot_get(const char *dir) if (cvs_rootstr != NULL) return cvsroot_parse(cvs_rootstr); - if (strlcpy(rootpath, dir, sizeof(rootpath)) >= sizeof(rootpath) || - strlcat(rootpath, "/", sizeof(rootpath)) >= sizeof(rootpath) || - strlcat(rootpath, CVS_PATH_ROOTSPEC, - sizeof(rootpath)) >= sizeof(rootpath)) { - errno = ENAMETOOLONG; - fatal("cvsroot_get: %s: %s", rootpath, strerror(errno)); - } + (void)xsnprintf(rootpath, MAXPATHLEN, "%s/%s", dir, CVS_PATH_ROOTSPEC); if ((fp = fopen(rootpath, "r")) == NULL) { if (errno == ENOENT) { |