From 449cc391d9010f28219c03f06f0ab57bf8a4b3bb Mon Sep 17 00:00:00 2001 From: Peter Hawkins Date: Mon, 10 Aug 1998 10:29:11 +0000 Subject: [PATCH] PR: 7522 Correct bug in the inverse operator optimisation code which caused segv on ! without a following expression. --- usr.bin/find/operator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/find/operator.c b/usr.bin/find/operator.c index 22bfeb69cbde..d331faf9a5fe 100644 --- a/usr.bin/find/operator.c +++ b/usr.bin/find/operator.c @@ -190,7 +190,7 @@ not_squish(plan) int notlevel = 1; node = yanknode(&plan); - while (node->type == N_NOT) { + while ((node != NULL) && (node->type == N_NOT)) { ++notlevel; node = yanknode(&plan); }