summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2009-03-18 09:14:10 +0000
committerJoris Vink <joris@cvs.openbsd.org>2009-03-18 09:14:10 +0000
commit3f5c7447a62449432c08c19ff116ecb1d898cbf6 (patch)
tree4362f72722d8afb353b76e2c93ab6ada6c576479 /usr.bin
parent3655190ff43eba48e189c227ce4d74a6e31d4870 (diff)
be carefull when trying to access cf->file_rcs in cvs_checkout_file()
as it could be NULL under certain conditions.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/checkout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c
index 0b8ac4f50a5..76468d3ff33 100644
--- a/usr.bin/cvs/checkout.c
+++ b/usr.bin/cvs/checkout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: checkout.c,v 1.160 2009/02/23 21:32:08 joris Exp $ */
+/* $OpenBSD: checkout.c,v 1.161 2009/03/18 09:14:09 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -567,7 +567,7 @@ cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, char *tag, int co_flags)
sticky[0] = '\0';
kbuf[0] = '\0';
- if (cf->file_rcs->rf_expand != NULL) {
+ if (cf->file_rcs != NULL && cf->file_rcs->rf_expand != NULL) {
cf_kflag = rcs_kflag_get(cf->file_rcs->rf_expand);
if (kflag || cf_kflag != RCS_KWEXP_DEFAULT)
(void)xsnprintf(kbuf, sizeof(kbuf),