diff options
author | Tobias Stoeckmann <tobias@stoeckmann.org> | 2023-12-14 22:53:55 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2023-12-31 08:00:00 +0000 |
commit | 623f32044c0f1e19744635cf415ee66479db9769 (patch) | |
tree | c6a70b79f5f47326d3148bf68b77e76dd4e5d93a | |
parent | 00fd271cfc3c338a2419507f46c8244a8d52a33f (diff) | |
download | pam-623f32044c0f1e19744635cf415ee66479db9769.tar.gz pam-623f32044c0f1e19744635cf415ee66479db9769.tar.bz2 pam-623f32044c0f1e19744635cf415ee66479db9769.zip |
pam_exec: support very large argc values
Prepare the calculation to support very large argc values in order to
support arbitrarily long configuration lines in the future.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
-rw-r--r-- | modules/pam_exec/pam_exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/pam_exec/pam_exec.c b/modules/pam_exec/pam_exec.c index 41f6c589..e79cb905 100644 --- a/modules/pam_exec/pam_exec.c +++ b/modules/pam_exec/pam_exec.c @@ -436,7 +436,7 @@ call_exec (const char *pam_type, pam_handle_t *pamh, _exit (err); } - arggv = calloc (argc + 4, sizeof (char *)); + arggv = calloc ((size_t) argc + 1, sizeof (char *)); if (arggv == NULL) _exit (ENOMEM); |