]> 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)
commitfc02b87e2876b2492a3d5eebd3b70be383b08f40
tree19301491c363e8f87b15d53f1f742b5975161749
parent179c45ae2fb9519a343bc2e38ebe4609097d14af
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