diff options
author | christos <christos@NetBSD.org> | 2006-03-18 23:54:17 +0000 |
---|---|---|
committer | christos <christos@NetBSD.org> | 2006-03-18 23:54:17 +0000 |
commit | d425ea7991773e7a64d9d22b91d2d245c6a717e7 (patch) | |
tree | 219594f4144fbf09e6cbc34c948b0feea9ada234 /fortune/fortune | |
parent | 3019924c0b22bc7459420eba08010f879ca84586 (diff) | |
download | bsdgames-darwin-d425ea7991773e7a64d9d22b91d2d245c6a717e7.tar.gz bsdgames-darwin-d425ea7991773e7a64d9d22b91d2d245c6a717e7.tar.zst bsdgames-darwin-d425ea7991773e7a64d9d22b91d2d245c6a717e7.zip |
Coverity CID 827: Prevent NULL pointer deref.
Diffstat (limited to 'fortune/fortune')
-rw-r--r-- | fortune/fortune/fortune.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fortune/fortune/fortune.c b/fortune/fortune/fortune.c index 7c7c48e0..2addaab8 100644 --- a/fortune/fortune/fortune.c +++ b/fortune/fortune/fortune.c @@ -1,4 +1,4 @@ -/* $NetBSD: fortune.c,v 1.46 2006/03/18 23:51:51 christos Exp $ */ +/* $NetBSD: fortune.c,v 1.47 2006/03/18 23:54:17 christos Exp $ */ /*- * Copyright (c) 1986, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1986, 1993\n\ #if 0 static char sccsid[] = "@(#)fortune.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: fortune.c,v 1.46 2006/03/18 23:51:51 christos Exp $"); +__RCSID("$NetBSD: fortune.c,v 1.47 2006/03/18 23:54:17 christos Exp $"); #endif #endif /* not lint */ @@ -614,7 +614,7 @@ over: * we are scanning a directory, since the scan will pick up the * -o file anyway. */ - if (All_forts && parent == NULL && !is_off_name(path)) + if (All_forts && parent == NULL && !is_off_name(path) && offensive) all_forts(fp, offensive); if (*head == NULL) *head = *tail = fp; |