summaryrefslogtreecommitdiff
path: root/usr.bin/rcs/rcs.c
diff options
context:
space:
mode:
authorNiall O'Higgins <niallo@cvs.openbsd.org>2006-06-04 02:56:54 +0000
committerNiall O'Higgins <niallo@cvs.openbsd.org>2006-06-04 02:56:54 +0000
commit9d193f7a39bfcdc884af821ffa868bd929cb051d (patch)
tree34a13cf25eba6c3ddb76edcba74091d4de050449 /usr.bin/rcs/rcs.c
parentcfbaf0820e438c385c5909d4dc504139ae2ae6db (diff)
- ensure fin pointer is not invalidated after realloc
Diffstat (limited to 'usr.bin/rcs/rcs.c')
-rw-r--r--usr.bin/rcs/rcs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/rcs/rcs.c b/usr.bin/rcs/rcs.c
index 4a2a81c4974..aa99389817b 100644
--- a/usr.bin/rcs/rcs.c
+++ b/usr.bin/rcs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.14 2006/06/04 02:54:59 niallo Exp $ */
+/* $OpenBSD: rcs.c,v 1.15 2006/06/04 02:56:53 niallo Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -2768,6 +2768,7 @@ rcs_expand_keywords(char *rcsfile, struct rcs_delta *rdp, BUF *bp, int mode)
* after realloc()
*/
start = data + start_offset;
+ fin = data + len;
}
memcpy(start, expbuf, strlen(expbuf));
start += strlen(expbuf);