diff options
author | Bruce Momjian <bruce@momjian.us> | 2014-04-17 12:37:53 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2014-04-17 12:37:53 -0400 |
commit | fc72e94a13026b86a06c7f5c670f4c16420d3d77 (patch) | |
tree | 0572054c47891b08d2e47a3223a09eea87f2b46c /contrib/pgcrypto/px-crypt.c | |
parent | 071d9f085089f3fbae1b472debd38c555cd4a436 (diff) |
pgcrypto: fix memset() calls that might be optimized away
Specifically, on-stack memset() might be removed, so:
* Replace memset() with px_memset()
* Add px_memset to copy_crlf()
* Add px_memset to pgp-s2k.c
Patch by Marko Kreen
Report by PVS-Studio
Backpatch through 8.4.
Diffstat (limited to 'contrib/pgcrypto/px-crypt.c')
-rw-r--r-- | contrib/pgcrypto/px-crypt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/pgcrypto/px-crypt.c b/contrib/pgcrypto/px-crypt.c index 63ec038dc54..523efc8fb02 100644 --- a/contrib/pgcrypto/px-crypt.c +++ b/contrib/pgcrypto/px-crypt.c @@ -158,7 +158,7 @@ px_gen_salt(const char *salt_type, char *buf, int rounds) return res; p = g->gen(rounds, rbuf, g->input_len, buf, PX_MAX_SALT_LEN); - memset(rbuf, 0, sizeof(rbuf)); + px_memset(rbuf, 0, sizeof(rbuf)); if (p == NULL) return PXE_BAD_SALT_ROUNDS; |