aboutsummaryrefslogtreecommitdiff
path: root/libpam
diff options
context:
space:
mode:
authorArseny Maslennikov <ar@cs.msu.ru>2024-02-04 12:00:00 +0300
committerArseny Maslennikov <ar@cs.msu.ru>2024-02-04 12:00:00 +0300
commit9fa68ae79c213026d9621d6a70defb381e5a0533 (patch)
treeb3951162e5ae62f2f26961a168e6fb0d63b341dc /libpam
parentb7b96362087414e52524d3d9d9b3faa21e1db620 (diff)
downloadpam-9fa68ae79c213026d9621d6a70defb381e5a0533.tar.gz
pam-9fa68ae79c213026d9621d6a70defb381e5a0533.tar.bz2
pam-9fa68ae79c213026d9621d6a70defb381e5a0533.zip
pam_inline.h: Fix use of memset_explicit(3)
That function is being added to C23 with the same prototype as memset(3): void* memset_explicit(void*, int, size_t); Unlike bzero, it accepts the fill byte as an argument. Fixes: 19a292681789 ("libpam: introduce secure memory erasure helpers")
Diffstat (limited to 'libpam')
-rw-r--r--libpam/include/pam_inline.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpam/include/pam_inline.h b/libpam/include/pam_inline.h
index 7721c0b7..cf04c9af 100644
--- a/libpam/include/pam_inline.h
+++ b/libpam/include/pam_inline.h
@@ -82,7 +82,7 @@ pam_str_skip_icase_prefix_len(const char *str, const char *prefix, size_t prefix
static inline void pam_overwrite_n(void *ptr, size_t len)
{
if (ptr)
- memset_explicit(ptr, len);
+ memset_explicit(ptr, '\0', len);
}
#elif defined HAVE_EXPLICIT_BZERO
static inline void pam_overwrite_n(void *ptr, size_t len)