aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2023-11-13 14:04:27 +0100
committerDmitry V. Levin <ldv@strace.io>2023-11-13 13:24:08 +0000
commit3157eb8f9cb54c4a48bd255adc9e8ebd9b7f7acd (patch)
tree00eae3e887457ea1089ad27adf48171831e29350 /modules
parentcd11d66f33ed140018af7b6419aa1571ceaa873b (diff)
downloadpam-3157eb8f9cb54c4a48bd255adc9e8ebd9b7f7acd.tar.gz
pam-3157eb8f9cb54c4a48bd255adc9e8ebd9b7f7acd.tar.bz2
pam-3157eb8f9cb54c4a48bd255adc9e8ebd9b7f7acd.zip
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 <BenBE@geshi.org>
Diffstat (limited to 'modules')
-rw-r--r--modules/pam_env/pam_env.c2
1 files changed, 1 insertions, 1 deletions
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;