aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/csup/rcsparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/csup/rcsparse.c')
-rw-r--r--usr.bin/csup/rcsparse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr.bin/csup/rcsparse.c b/usr.bin/csup/rcsparse.c
index 5ea690ccde36..248d0ab4e49a 100644
--- a/usr.bin/csup/rcsparse.c
+++ b/usr.bin/csup/rcsparse.c
@@ -318,6 +318,14 @@ parse_deltatexts(struct rcsfile *rf, yyscan_t *sp, int token)
d = rcsfile_getdelta(rf, revnum);
free(revnum);
+ /*
+ * XXX: The RCS file is corrupt, but lie and say it is ok.
+ * If it is actually broken, then the MD5 mismatch will
+ * trigger a fixup.
+ */
+ if (d == NULL)
+ return (0);
+
/* log string */
asserttoken(sp, KEYWORD);
asserttoken(sp, STRING);