diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-12-07 09:14:17 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-12-07 09:14:17 +0000 |
commit | 743cde67547d2d3ea9d89ba3dcf0bae917444748 (patch) | |
tree | b703fb1515c8a8af58b60b5ef74deb28a879a3f6 | |
parent | 7421c13fa5fc11b769729e592488d6bad5a2bf62 (diff) |
snprintf() -> cvs_path_cat()
-rw-r--r-- | usr.bin/cvs/update.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c index c702124b9bc..4518dd9d987 100644 --- a/usr.bin/cvs/update.c +++ b/usr.bin/cvs/update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: update.c,v 1.80 2006/07/07 17:37:17 joris Exp $ */ +/* $OpenBSD: update.c,v 1.81 2006/12/07 09:14:16 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -172,7 +172,7 @@ cvs_update_leavedir(struct cvs_file *cf) { long base; int nbytes; - int isempty, l; + int isempty; size_t bufsize; struct stat st; struct dirent *dp; @@ -186,10 +186,9 @@ cvs_update_leavedir(struct cvs_file *cf) if (cvs_cmdop == CVS_OP_EXPORT) { export = xmalloc(MAXPATHLEN); - l = snprintf(export, MAXPATHLEN, "%s/%s", cf->file_path, - CVS_PATH_CVSDIR); - if (l == -1 || l >= MAXPATHLEN) - fatal("cvs_update_leavedir: overflow"); + if (cvs_path_cat(cf->file_path, CVS_PATH_CVSDIR, export, + MAXPATHLEN) >= MAXPATHLEN) + fatal("cvs_update_leavedir: truncation"); /* XXX */ if (cvs_rmdir(export) == -1) |