diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2011-04-04 23:08:31 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2011-04-04 23:08:31 +0000 |
commit | b7aed20b9d2ce99261b0652f4e4a150195635af1 (patch) | |
tree | 0cbc1dcf71c8127422e01dda3f4e25a8604ab29c /usr.bin | |
parent | afa40027b1091cfce8fc52dbaec59686b5929dff (diff) |
previous commit introduced a crash: the removed strtol was being used to
skip past a value and it couldn't just be nuked
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/rcs/rcs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/rcs/rcs.c b/usr.bin/rcs/rcs.c index 6a69cb31f5e..ccddede997f 100644 --- a/usr.bin/rcs/rcs.c +++ b/usr.bin/rcs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.73 2011/03/27 18:22:50 jasper Exp $ */ +/* $OpenBSD: rcs.c,v 1.74 2011/04/04 23:08:30 djm Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -1214,6 +1214,7 @@ rcs_delta_stats(struct rcs_delta *rdp, int *ladded, int *lremoved) /* NUL-terminate line buffer for strtol() safety. */ tmp = lp->l_line[lp->l_len - 1]; lp->l_line[lp->l_len - 1] = '\0'; + (void)strtol((lp->l_line + 1), &ep, 10); ep++; nbln = (int)strtol(ep, &ep, 10); /* Restore the last byte of the buffer */ |