summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/rcs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 04d7005788f..a23fc84b9dc 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.114 2005/12/20 18:17:01 xsa Exp $ */
+/* $OpenBSD: rcs.c,v 1.115 2005/12/22 02:26:33 niallo Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -1240,6 +1240,11 @@ rcs_getrev(RCSFILE *rfp, RCSNUM *frev)
}
len = rdp->rd_tlen;
+ if (len == 0) {
+ rbuf = cvs_buf_alloc(1, 0);
+ cvs_buf_empty(rbuf);
+ return (rbuf);
+ }
if ((rbuf = cvs_buf_alloc(len, BUF_AUTOEXT)) == NULL)
return (NULL);