From 057131159b445d2d49392e95c677ad7b4cd4ae9c Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 26 Mar 2021 16:46:51 +0100 Subject: [PATCH] gpgconf: Fix another argv overflow if --homedir is used. * tools/gpgconf-comp.c (gc_component_check_options): Increase array. -- I missed to fix that one with the last patch. Note that there was no problem in 2.2 at thismlocation - probably because it had been manually backported once. GnuPG-bug-id: 5366 Signed-off-by: Werner Koch --- tools/gpgconf-comp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c index 767e09b2d..ba950c28b 100644 --- a/tools/gpgconf-comp.c +++ b/tools/gpgconf-comp.c @@ -1307,7 +1307,7 @@ gc_component_check_options (int component, estream_t out, const char *conf_file) gpg_error_t err; unsigned int result; const char *pgmname; - const char *argv[5]; + const char *argv[6]; int i; pid_t pid; int exitcode; @@ -1338,7 +1338,8 @@ gc_component_check_options (int component, estream_t out, const char *conf_file) argv[i++] = "--version"; else argv[i++] = "--gpgconf-test"; - argv[i++] = NULL; + argv[i] = NULL; + log_assert (i < DIM(argv)); result = 0; errlines = NULL;