=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/commit.c,v retrieving revision 1.39 retrieving revision 1.40 diff -c -r1.39 -r1.40 *** src/usr.bin/cvs/commit.c 2005/07/12 07:12:13 1.39 --- src/usr.bin/cvs/commit.c 2005/07/14 06:50:50 1.40 *************** *** 1,4 **** ! /* $OpenBSD: commit.c,v 1.39 2005/07/12 07:12:13 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: commit.c,v 1.40 2005/07/14 06:50:50 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 261,270 **** static int cvs_commit_local(CVSFILE *cf, void *arg) { - int len; char fpath[MAXPATHLEN], rcspath[MAXPATHLEN]; - char *repo; - struct cvsroot *root; if (cf->cf_type == DT_DIR) { if (verbosity > 1) --- 261,267 ---- *************** *** 272,289 **** return (0); } - root = CVS_DIR_ROOT(cf); - repo = CVS_DIR_REPO(cf); - cvs_file_getpath(cf, fpath, sizeof(fpath)); ! len = snprintf(rcspath, sizeof(rcspath), "%s/%s/%s%s", ! root->cr_dir, repo, fpath, RCS_FILE_EXT); ! if (len == -1 || len >= (int)sizeof(rcspath)) { ! errno = ENAMETOOLONG; ! cvs_log(LP_ERRNO, "%s", rcspath); return (CVS_EX_DATA); - } return (0); } --- 269,278 ---- return (0); } cvs_file_getpath(cf, fpath, sizeof(fpath)); ! if (cvs_rcs_getpath(cf, rcspath, sizeof(rcspath)) == NULL) return (CVS_EX_DATA); return (0); }