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 | fc02b87e2876b2492a3d5eebd3b70be383b08f40 (patch) | |
tree | 19301491c363e8f87b15d53f1f742b5975161749 /contrib/pgcrypto/pgp.c | |
parent | 179c45ae2fb9519a343bc2e38ebe4609097d14af (diff) | |
download | postgresql-fc02b87e2876b2492a3d5eebd3b70be383b08f40.tar.gz postgresql-fc02b87e2876b2492a3d5eebd3b70be383b08f40.zip |
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/pgp.c')
-rw-r--r-- | contrib/pgcrypto/pgp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/pgcrypto/pgp.c b/contrib/pgcrypto/pgp.c index b8a6bc49b40..a17ca93e0df 100644 --- a/contrib/pgcrypto/pgp.c +++ b/contrib/pgcrypto/pgp.c @@ -225,7 +225,7 @@ pgp_free(PGP_Context *ctx) { if (ctx->pub_key) pgp_key_free(ctx->pub_key); - memset(ctx, 0, sizeof *ctx); + px_memset(ctx, 0, sizeof *ctx); px_free(ctx); return 0; } |