From ab0674a1b628ea03f816c6b29d4ea0f03bad7060 Mon Sep 17 00:00:00 2001 From: ru Date: Thu, 4 Oct 2001 09:02:10 +0000 Subject: [PATCH] Terminate the array of execv(3) pointers by a NULL pointer in the edge case. PR: bin/30913 Submitted by: Dimitri Lommers --- libexec/fingerd/fingerd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/fingerd/fingerd.c b/libexec/fingerd/fingerd.c index 8524acd1ffdb..f56432f4e733 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; }