pgcrypto: fix memset() calls that might be optimized away
authorBruce Momjian <bruce@momjian.us>
Thu, 17 Apr 2014 16:37:53 +0000 (12:37 -0400)
committerBruce Momjian <bruce@momjian.us>
Thu, 17 Apr 2014 16:37:53 +0000 (12:37 -0400)
commitfc72e94a13026b86a06c7f5c670f4c16420d3d77
tree0572054c47891b08d2e47a3223a09eea87f2b46c
parent071d9f085089f3fbae1b472debd38c555cd4a436
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.
22 files changed:
contrib/pgcrypto/crypt-blowfish.c
contrib/pgcrypto/crypt-md5.c
contrib/pgcrypto/fortuna.c
contrib/pgcrypto/internal-sha2.c
contrib/pgcrypto/internal.c
contrib/pgcrypto/mbuf.c
contrib/pgcrypto/openssl.c
contrib/pgcrypto/pgp-cfb.c
contrib/pgcrypto/pgp-compress.c
contrib/pgcrypto/pgp-decrypt.c
contrib/pgcrypto/pgp-encrypt.c
contrib/pgcrypto/pgp-mpi.c
contrib/pgcrypto/pgp-pgsql.c
contrib/pgcrypto/pgp-pubenc.c
contrib/pgcrypto/pgp-pubkey.c
contrib/pgcrypto/pgp-s2k.c
contrib/pgcrypto/pgp.c
contrib/pgcrypto/px-crypt.c
contrib/pgcrypto/px-hmac.c
contrib/pgcrypto/px.c
contrib/pgcrypto/px.h
contrib/pgcrypto/sha2.c