summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2001-10-04 09:02:10 +0000
committerru <ru@FreeBSD.org>2001-10-04 09:02:10 +0000
commit3837a9604cd492cfe3c939643b7324237f8cd924 (patch)
tree03f08a726d1a1aaf94f4e2c6924c643705d640fa
parent17f224e149ec1db86e6bdcf167267e1570a0eebf (diff)
downloadFreeBSD-src-3837a9604cd492cfe3c939643b7324237f8cd924.zip
FreeBSD-src-3837a9604cd492cfe3c939643b7324237f8cd924.tar.gz
Terminate the array of execv(3) pointers by a NULL pointer in the edge case.
PR: bin/30913 Submitted by: Dimitri Lommers <dimitri@hinttech.com>
-rw-r--r--libexec/fingerd/fingerd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/fingerd/fingerd.c b/libexec/fingerd/fingerd.c
index 8524acd..f56432f 100644
--- a/libexec/fingerd/fingerd.c
+++ b/libexec/fingerd/fingerd.c
@@ -161,8 +161,10 @@ main(argc, argv)
av[1] = "-l";
comp = &av[0];
}
- else if (++ap == av + ENTRIES)
+ else if (++ap == av + ENTRIES) {
+ *ap = NULL;
break;
+ }
lp = NULL;
}
OpenPOWER on IntegriCloud