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.
Branch
------
REL9_0_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/a1b9c46300e2a24478f480c63ec2c53c3e53acef
Modified Files
--------------
contrib/pgcrypto/crypt-blowfish.c | 6 +++---
contrib/pgcrypto/crypt-md5.c | 4 ++--
contrib/pgcrypto/fortuna.c | 15 ++++++++-------
contrib/pgcrypto/internal-sha2.c | 8 ++++----
contrib/pgcrypto/internal.c | 10 +++++-----
contrib/pgcrypto/mbuf.c | 12 ++++++------
contrib/pgcrypto/openssl.c | 4 ++--
contrib/pgcrypto/pgp-cfb.c | 2 +-
contrib/pgcrypto/pgp-compress.c | 4 ++--
contrib/pgcrypto/pgp-decrypt.c | 19 ++++++++++---------
contrib/pgcrypto/pgp-encrypt.c | 10 +++++-----
contrib/pgcrypto/pgp-mpi.c | 2 +-
contrib/pgcrypto/pgp-pgsql.c | 6 +++---
contrib/pgcrypto/pgp-pubenc.c | 6 +++---
contrib/pgcrypto/pgp-pubkey.c | 8 ++++----
contrib/pgcrypto/pgp-s2k.c | 3 +++
contrib/pgcrypto/pgp.c | 2 +-
contrib/pgcrypto/px-crypt.c | 2 +-
contrib/pgcrypto/px-hmac.c | 8 ++++----
contrib/pgcrypto/px.c | 8 +++++++-
contrib/pgcrypto/px.h | 1 +
contrib/pgcrypto/sha2.c | 9 +++++----
22 files changed, 81 insertions(+), 68 deletions(-)