From 31d17019c2911ac0469067ceb1d741c569c0558e Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Sat, 20 Jan 2007 01:31:04 +0000 Subject: more safety checks for file->file_rcsrev; 'cool' niallo@ --- usr.bin/cvs/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/cvs') diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index 5aed4420741..79b048d2d9a 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.172 2007/01/20 00:58:19 niallo Exp $ */ +/* $OpenBSD: file.c,v 1.173 2007/01/20 01:31:03 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau @@ -716,7 +716,7 @@ cvs_file_classify(struct cvs_file *cf, const char *tag, int loud) ismodified = 0; } - if (cf->file_rcs != NULL) { + if (cf->file_rcs != NULL && cf->file_rcsrev != NULL) { state = rcs_state_get(cf->file_rcs, cf->file_rcsrev); if (state == NULL) fatal("failed to get state for HEAD for %s", -- cgit v1.2.3