]> granicus.if.org Git - postgresql/commit
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)
commita1b9c46300e2a24478f480c63ec2c53c3e53acef
tree2613d265011025131e37c0f7b3e9c2dd820ea0f0
parent234283ecd30a184448b93ca82ec1ae270e44f703
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