diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-07-14 04:24:47 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-07-14 04:24:47 +0000 |
commit | 5aa981b28e91c86c90f78babe6c3a32effc92e72 (patch) | |
tree | 4c91d20adfb074341dd660a83756f033f089b514 /usr.bin | |
parent | e258cf2fab6e8a657d94f22b30ce59ffad54a32b (diff) |
get rid of the newline when copying the root string
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/root.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/cvs/root.c b/usr.bin/cvs/root.c index f4e73c57329..916dea3fff3 100644 --- a/usr.bin/cvs/root.c +++ b/usr.bin/cvs/root.c @@ -1,4 +1,4 @@ -/* $OpenBSD: root.c,v 1.2 2004/07/14 04:12:43 vincent Exp $ */ +/* $OpenBSD: root.c,v 1.3 2004/07/14 04:24:46 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -251,8 +251,8 @@ cvsroot_get(const char *dir) (void)fclose(fp); return (NULL); } - memcpy(rootstr, line, len); - rootstr[len] = '\0'; + memcpy(rootstr, line, len - 1); + rootstr[len - 1] = '\0'; rp = cvsroot_parse(rootstr); (void)fclose(fp); |