diff options
author | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-06-04 02:54:08 +0000 |
---|---|---|
committer | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-06-04 02:54:08 +0000 |
commit | f92f84a9f10cac8be8b755b3a6bc53d2cc6746ad (patch) | |
tree | 81349ecaa3e81ea6c95893c959ce377e5d0599cf /usr.bin/rcs/rcs.c | |
parent | d2e27986b2055c89cc1ab1c71b0403ef1474d47e (diff) |
- fix off-by-one in rcs_expand_keywords()
Diffstat (limited to 'usr.bin/rcs/rcs.c')
-rw-r--r-- | usr.bin/rcs/rcs.c | 6 |
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); } |