summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/file.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2005-05-12 23:43:50 +0000
committerJoris Vink <joris@cvs.openbsd.org>2005-05-12 23:43:50 +0000
commit5728d6d0d304c5056a4e0d23ab3759436d8b057f (patch)
tree52bdce6e6c8334edf6bdc95ec574a95d2955546f /usr.bin/cvs/file.c
parentd793d699c8b5bd9c7c4c32096d9b35381ce008a0 (diff)
set cvsent to NULL if entfile is NULL, fixes a crash
in cvs_file_lget().
Diffstat (limited to 'usr.bin/cvs/file.c')
-rw-r--r--usr.bin/cvs/file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index 30415dad184..b6404cd22b9 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.70 2005/05/12 23:35:42 joris Exp $ */
+/* $OpenBSD: file.c,v 1.71 2005/05/12 23:43:49 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -675,6 +675,9 @@ cvs_file_getdir(CVSFILE *cf, int flags, char *path)
if (cfp == NULL) {
if (entfile != NULL)
cvsent = cvs_ent_get(entfile, ent->d_name);
+ else
+ cvsent = NULL;
+
cfp = cvs_file_lget(pbuf, flags, cf, cvsent);
if (cfp == NULL) {