From 623f32044c0f1e19744635cf415ee66479db9769 Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Thu, 14 Dec 2023 22:53:55 +0100 Subject: 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 --- modules/pam_exec/pam_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/pam_exec') 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); -- cgit v1.2.3