]> 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)
commitea8725a8b376b46324b47616432670769cae95ed
tree91ca7ccb55ea85565370d1777a16bd6ceda9e69a
parentd3c7498042658884d388c1e86f060d2bf563eedd
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