=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/root.c,v retrieving revision 1.34 retrieving revision 1.35 diff -c -r1.34 -r1.35 *** src/usr.bin/cvs/root.c 2007/01/18 22:52:23 1.34 --- src/usr.bin/cvs/root.c 2007/02/07 17:54:42 1.35 *************** *** 1,4 **** ! /* $OpenBSD: root.c,v 1.34 2007/01/18 22:52:23 niallo Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: root.c,v 1.35 2007/02/07 17:54:42 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 229,241 **** 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)); ! } if ((fp = fopen(rootpath, "r")) == NULL) { if (errno == ENOENT) { --- 229,235 ---- if (cvs_rootstr != NULL) return cvsroot_parse(cvs_rootstr); ! (void)xsnprintf(rootpath, MAXPATHLEN, "%s/%s", dir, CVS_PATH_ROOTSPEC); if ((fp = fopen(rootpath, "r")) == NULL) { if (errno == ENOENT) {