summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/diff.c
diff options
context:
space:
mode:
authorniallo <niallo@openbsd.org>2007-01-20 01:07:51 +0000
committerniallo <niallo@openbsd.org>2007-01-20 01:07:51 +0000
commitbd433604365a760a00705ea1e00d4f3ed3349878 (patch)
treeca1c481145b9b4856d0c82434554603314e0fd73 /usr.bin/cvs/diff.c
parentcheck return value of rcs_translate_tag(). prevents a segfault found by todd@. still need to fix tag translation though. (diff)
downloadwireguard-openbsd-bd433604365a760a00705ea1e00d4f3ed3349878.tar.xz
wireguard-openbsd-bd433604365a760a00705ea1e00d4f3ed3349878.zip
sweep opencvs for missing rcs_translate_tag() return checks.
Diffstat (limited to 'usr.bin/cvs/diff.c')
-rw-r--r--usr.bin/cvs/diff.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/cvs/diff.c b/usr.bin/cvs/diff.c
index 2910f9a7399..ba3774d724c 100644
--- a/usr.bin/cvs/diff.c
+++ b/usr.bin/cvs/diff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff.c,v 1.114 2007/01/15 04:21:38 joris Exp $ */
+/* $OpenBSD: diff.c,v 1.115 2007/01/20 01:07:51 niallo Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -192,9 +192,11 @@ cvs_diff_local(struct cvs_file *cf)
}
if (rev1 != NULL)
- diff_rev1 = rcs_translate_tag(rev1, cf->file_rcs);
+ if ((diff_rev1 = rcs_translate_tag(rev1, cf->file_rcs)) == NULL)
+ fatal("cvs_diff_local: could not translate tag `%s'", rev1);
if (rev2 != NULL)
- diff_rev2 = rcs_translate_tag(rev2, cf->file_rcs);
+ if ((diff_rev2 = rcs_translate_tag(rev2, cf->file_rcs)) == NULL)
+ fatal("cvs_diff_local: could not translate tag `%s'", rev2);
diff_file = cf->file_path;
cvs_printf("Index: %s\n%s\nRCS file: %s\n", cf->file_path,