diff options
author | Tobias Stoeckmann <tobias@stoeckmann.org> | 2024-01-18 22:35:04 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2024-01-18 21:35:04 +0000 |
commit | aec921fc9af8a99920be9149145b2aeb9a917031 (patch) | |
tree | 3306ab1cfb0d239496ee1cf6675a1220009ae990 /libpam_misc | |
parent | 9e4e3e42554fc6344a0b20b42aafb48011e9b2c9 (diff) | |
download | pam-aec921fc9af8a99920be9149145b2aeb9a917031.tar.gz pam-aec921fc9af8a99920be9149145b2aeb9a917031.tar.bz2 pam-aec921fc9af8a99920be9149145b2aeb9a917031.zip |
libpam_misc: use size_t for sizes
Theoretically the int might overflow. Use a size_t to protect this
function which might be called from an application, because it is
exposed through pam_misc.h header.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Diffstat (limited to 'libpam_misc')
-rw-r--r-- | libpam_misc/help_env.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpam_misc/help_env.c b/libpam_misc/help_env.c index b01c9f71..ad7d5190 100644 --- a/libpam_misc/help_env.c +++ b/libpam_misc/help_env.c @@ -22,10 +22,10 @@ char **pam_misc_drop_env(char **dump) { - int i; + size_t i; for (i=0; dump[i] != NULL; ++i) { - D(("dump[%d]=`%s'", i, dump[i])); + D(("dump[%zu]=`%s'", i, dump[i])); pam_overwrite_string(dump[i]); _pam_drop(dump[i]); } |