summaryrefslogtreecommitdiffstats
path: root/usr.bin/find
diff options
context:
space:
mode:
authorthepish <thepish@FreeBSD.org>1998-08-10 10:29:11 +0000
committerthepish <thepish@FreeBSD.org>1998-08-10 10:29:11 +0000
commit0e700d0611e1dc6fa1f19261cb75ac18878dd2b8 (patch)
tree751e3fc0b0f61313175f887d3caee6ab3b27082c /usr.bin/find
parentfac8c3d1061f5f740a31251ed5314503a0d6049a (diff)
downloadFreeBSD-src-0e700d0611e1dc6fa1f19261cb75ac18878dd2b8.zip
FreeBSD-src-0e700d0611e1dc6fa1f19261cb75ac18878dd2b8.tar.gz
PR: 7522
Correct bug in the inverse operator optimisation code which caused segv on ! without a following expression.
Diffstat (limited to 'usr.bin/find')
-rw-r--r--usr.bin/find/operator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/find/operator.c b/usr.bin/find/operator.c
index 22bfeb6..d331faf 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);
}
OpenPOWER on IntegriCloud