From 3157eb8f9cb54c4a48bd255adc9e8ebd9b7f7acd Mon Sep 17 00:00:00 2001 From: Benny Baumann Date: Mon, 13 Nov 2023 14:04:27 +0100 Subject: pam_env: use printf type annotation for size_t There was a debug message still using %d (int) instead of the contextually correct %zu (size_t AKA long unsigned int), potentially causing silent truncation of the printed value. Signed-off-by: Benny Baumann --- modules/pam_env/pam_env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/pam_env') diff --git a/modules/pam_env/pam_env.c b/modules/pam_env/pam_env.c index a5c47d92..2b33aa5f 100644 --- a/modules/pam_env/pam_env.c +++ b/modules/pam_env/pam_env.c @@ -694,7 +694,7 @@ _expand_arg(pam_handle_t *pamh, char **value) if (idx > strlen(*value)) { free(*value); if ((*value = malloc(idx + 1)) == NULL) { - D(("Couldn't malloc %d bytes for expanded var", idx + 1)); + D(("Couldn't malloc %zu bytes for expanded var", idx + 1)); pam_syslog (pamh, LOG_CRIT, "Couldn't malloc %lu bytes for expanded var", (unsigned long)idx+1); goto buf_err; -- cgit v1.2.3