1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-05-28 21:50:02 +02:00

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>
This commit is contained in:
Werner Koch 2021-03-26 16:46:51 +01:00
parent d3d57a1bc8
commit 057131159b
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -1307,7 +1307,7 @@ gc_component_check_options (int component, estream_t out, const char *conf_file)
gpg_error_t err; gpg_error_t err;
unsigned int result; unsigned int result;
const char *pgmname; const char *pgmname;
const char *argv[5]; const char *argv[6];
int i; int i;
pid_t pid; pid_t pid;
int exitcode; int exitcode;
@ -1338,7 +1338,8 @@ gc_component_check_options (int component, estream_t out, const char *conf_file)
argv[i++] = "--version"; argv[i++] = "--version";
else else
argv[i++] = "--gpgconf-test"; argv[i++] = "--gpgconf-test";
argv[i++] = NULL; argv[i] = NULL;
log_assert (i < DIM(argv));
result = 0; result = 0;
errlines = NULL; errlines = NULL;