]> git.ipfire.org Git - thirdparty/postgresql.git/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)
commitdf2e62603ebc59a8fff5b6cd21b844370a95b061
tree313d7e08ed9fe146b73d7e998c61a344cd3e1438
parent7a9bf93e1ca5ffd207da22bce03dfbe1024cd668
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