diff options
author | Werner Koch <wk@gnupg.org> | 2021-03-26 16:46:51 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2021-03-26 16:51:35 +0100 |
commit | 057131159b445d2d49392e95c677ad7b4cd4ae9c (patch) | |
tree | cb760532f55f5ed768ead70a4d4adac32bee8b55 /tools | |
parent | gpgconf: Fix argv overflow if --homedir is used. (diff) | |
download | gnupg2-057131159b445d2d49392e95c677ad7b4cd4ae9c.tar.xz gnupg2-057131159b445d2d49392e95c677ad7b4cd4ae9c.zip |
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 <wk@gnupg.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gpgconf-comp.c | 5 |
1 files 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; |