summaryrefslogtreecommitdiff
path: root/usr.bin/rcs/rcs.c
diff options
context:
space:
mode:
authorNiall O'Higgins <niallo@cvs.openbsd.org>2006-06-04 02:54:08 +0000
committerNiall O'Higgins <niallo@cvs.openbsd.org>2006-06-04 02:54:08 +0000
commitf92f84a9f10cac8be8b755b3a6bc53d2cc6746ad (patch)
tree81349ecaa3e81ea6c95893c959ce377e5d0599cf /usr.bin/rcs/rcs.c
parentd2e27986b2055c89cc1ab1c71b0403ef1474d47e (diff)
- fix off-by-one in rcs_expand_keywords()
Diffstat (limited to 'usr.bin/rcs/rcs.c')
-rw-r--r--usr.bin/rcs/rcs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/rcs/rcs.c b/usr.bin/rcs/rcs.c
index 47e7eb48a31..5433df9f4d8 100644
--- a/usr.bin/rcs/rcs.c
+++ b/usr.bin/rcs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.12 2006/06/03 03:05:10 niallo Exp $ */
+/* $OpenBSD: rcs.c,v 1.13 2006/06/04 02:54:07 niallo Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -2776,8 +2776,8 @@ rcs_expand_keywords(char *rcsfile, struct rcs_delta *rdp, BUF *bp, int mode)
i += strlen(expbuf);
}
}
- bp = rcs_buf_alloc(len, BUF_AUTOEXT);
- rcs_buf_set(bp, data, len, 0);
+ bp = rcs_buf_alloc(len - 1, BUF_AUTOEXT);
+ rcs_buf_set(bp, data, len - 1, 0);
return (bp);
}