summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2010-07-31 11:37:37 +0000
committernicm <nicm@openbsd.org>2010-07-31 11:37:37 +0000
commitc6595ffe2828e517e0c6ce431ea15b0ad113c9df (patch)
tree0073ef9e9592e2f81afa7576a621e6fc0a64e72f
parentvery old thinko, not really a problem, obviously, but groups and users are (diff)
downloadwireguard-openbsd-c6595ffe2828e517e0c6ce431ea15b0ad113c9df.tar.xz
wireguard-openbsd-c6595ffe2828e517e0c6ce431ea15b0ad113c9df.zip
When looking for revision, break out of the loop at the end rather than
looping forever. This prevents the server going into an infinite loop when the repository is behind the checkout, but the behaviour is not correct (it is an error rather than ignoring the file), so mark with an XXX for now. Some underlying OpenCVS functions are too fatal()-happy and will probably need to be changed in order to fix this properly. Problem reported by sthen. ok xsa ray
-rw-r--r--usr.bin/cvs/rcs.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 3eac5b26018..4ea2d5912a4 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.297 2010/07/23 21:46:05 ray Exp $ */
+/* $OpenBSD: rcs.c,v 1.298 2010/07/31 11:37:37 nicm Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -2783,6 +2783,13 @@ again:
trdp = rcs_findrev(rfp, rdp->rd_next);
if (trdp == NULL)
fatal("failed to grab next revision");
+ } else {
+ /*
+ * XXX Fail, although the caller does not always do the
+ * right thing (eg cvs diff when the tree is ahead of
+ * the repository).
+ */
+ break;
}
if (rdp->rd_tlen == 0) {