diff options
author | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-12-04 03:53:31 +0000 |
---|---|---|
committer | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-12-04 03:53:31 +0000 |
commit | f65a70eb4bb096ee0ad4eea1c0f5a80bebc495e7 (patch) | |
tree | f88a7058029a6940da7fa1d87ca32c71a7551063 /usr.bin/cvs/rcs.c | |
parent | f75300543e3287bc2b76f6a4d16f495ed2f11153 (diff) |
- fix crash when doing keyword expansion of zero-length buffers.
ok ray@
Diffstat (limited to 'usr.bin/cvs/rcs.c')
-rw-r--r-- | usr.bin/cvs/rcs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index f3c4995be6a..4a43c9aaeda 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.188 2006/08/23 20:28:00 joris Exp $ */ +/* $OpenBSD: rcs.c,v 1.189 2006/12/04 03:53:30 niallo Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -2595,6 +2595,8 @@ rcs_expand_keywords(char *rcsfile, struct rcs_delta *rdp, BUF *bp, int mode) kwstr = NULL; len = cvs_buf_len(bp); + if (len == 0) + return (bp); c = cvs_buf_get(bp); found = 0; |