diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-01-26 09:05:32 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-01-26 09:05:32 +0000 |
commit | 7272697af33b1fbbec4d08d8d934ccf78113cd2c (patch) | |
tree | dff6c6a43dbf86fddb021b3451b36089a88d3c02 /usr.bin/cvs/resp.c | |
parent | faa4250cc2008856952bdf7a3480891be8d7014f (diff) |
strings cleanup; OK niallo@.
Diffstat (limited to 'usr.bin/cvs/resp.c')
-rw-r--r-- | usr.bin/cvs/resp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/cvs/resp.c b/usr.bin/cvs/resp.c index 7df59648e71..fb30b5f2362 100644 --- a/usr.bin/cvs/resp.c +++ b/usr.bin/cvs/resp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resp.c,v 1.69 2006/01/25 08:15:05 xsa Exp $ */ +/* $OpenBSD: resp.c,v 1.70 2006/01/26 09:05:31 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -391,7 +391,6 @@ cvs_resp_sticky(struct cvsroot *root, int type, char *line) static int cvs_resp_createdir(char *line) { - int l; CVSFILE *base, *cf; CVSENTRIES *entf; struct stat st; @@ -447,8 +446,10 @@ cvs_resp_createdir(char *line) */ if (entf != NULL) { if ((ent = cvs_ent_get(entf, cf->cf_name)) == NULL) { - l = snprintf(buf, sizeof(buf), "D/%s////", cf->cf_name); - if (l == -1 || l >= (int)sizeof(buf)) { + if (strlcpy(buf, "D/", sizeof(buf)) >= sizeof(buf) || + strlcat(buf, cf->cf_name, sizeof(buf)) >= + sizeof(buf) || + strlcat(buf, "////", sizeof(buf)) >= sizeof(buf)) { cvs_file_free(cf); cvs_file_free(base); return (-1); |