diff options
author | Bruce Momjian | 2014-04-17 16:37:53 +0000 |
---|---|---|
committer | Bruce Momjian | 2014-04-17 16:37:53 +0000 |
commit | 9fe55259fd61fd9199907623f974caa7af66e780 (patch) | |
tree | 2d2d7fc333474267d375ca35db482b8a4e42e253 /contrib/pgcrypto/pgp-compress.c | |
parent | 83defef8c794e7772e4099a7efa2ebac3c62742c (diff) |
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.
Diffstat (limited to 'contrib/pgcrypto/pgp-compress.c')
-rw-r--r-- | contrib/pgcrypto/pgp-compress.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pgcrypto/pgp-compress.c b/contrib/pgcrypto/pgp-compress.c index edd8255f6a3..9c328e3daeb 100644 --- a/contrib/pgcrypto/pgp-compress.c +++ b/contrib/pgcrypto/pgp-compress.c @@ -174,7 +174,7 @@ compress_free(void *priv) struct ZipStat *st = priv; deflateEnd(&st->stream); - memset(st, 0, sizeof(*st)); + px_memset(st, 0, sizeof(*st)); px_free(st); } @@ -297,7 +297,7 @@ decompress_free(void *priv) struct DecomprData *dec = priv; inflateEnd(&dec->stream); - memset(dec, 0, sizeof(*dec)); + px_memset(dec, 0, sizeof(*dec)); px_free(dec); } |