postgresql/contrib/pgcrypto
Tom Lane a59ee88197 Fix Coverity warning about contrib/pgcrypto's mdc_finish().
Coverity points out that mdc_finish returns a pointer to a local buffer
(which of course is gone as soon as the function returns), leaving open
a risk of misbehaviors possibly as bad as a stack overwrite.

In reality, the only possible call site is in process_data_packets()
which does not examine the returned pointer at all.  So there's no
live bug, but nonetheless the code is confusing and risky.  Refactor
to avoid the issue by letting process_data_packets() call mdc_finish()
directly instead of going through the pullf_read() API.

Although this is only cosmetic, it seems good to back-patch so that
the logic in pgp-decrypt.c stays in sync across all branches.

Marko Kreen
2015-01-30 13:05:30 -05:00
..
expected Loop when necessary in contrib/pgcrypto's pktreader_pull(). 2014-11-11 17:22:15 -05:00
sql Loop when necessary in contrib/pgcrypto's pktreader_pull(). 2014-11-11 17:22:15 -05:00
.gitignore
blf.c
blf.h
crypt-blowfish.c
crypt-des.c Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
crypt-gensalt.c
crypt-md5.c
fortuna.c
fortuna.h
imath.c
imath.h
internal-sha2.c
internal.c
Makefile Add functions for dealing with PGP armor header lines to pgcrypto. 2014-10-01 16:03:39 +03:00
mbuf.c
mbuf.h
md5.c
md5.h
openssl.c
pgcrypto--1.0--1.1.sql
pgcrypto--1.1--1.2.sql Add functions for dealing with PGP armor header lines to pgcrypto. 2014-10-01 16:03:39 +03:00
pgcrypto--1.2.sql Fix file-identification comment in contrib/pgcrypto/pgcrypto--1.2.sql. 2014-10-20 10:53:57 -04:00
pgcrypto--unpackaged--1.0.sql Fix typos in some error messages thrown by extension scripts when fed to psql. 2014-08-25 18:30:37 +02:00
pgcrypto.c
pgcrypto.control Add functions for dealing with PGP armor header lines to pgcrypto. 2014-10-01 16:03:39 +03:00
pgcrypto.h
pgp-armor.c Add functions for dealing with PGP armor header lines to pgcrypto. 2014-10-01 16:03:39 +03:00
pgp-cfb.c
pgp-compress.c
pgp-decrypt.c Fix Coverity warning about contrib/pgcrypto's mdc_finish(). 2015-01-30 13:05:30 -05:00
pgp-encrypt.c
pgp-info.c
pgp-mpi-internal.c
pgp-mpi-openssl.c
pgp-mpi.c
pgp-pgsql.c Docs: fix incorrect spelling of contrib/pgcrypto option. 2014-11-03 11:11:34 -05:00
pgp-pubdec.c
pgp-pubenc.c
pgp-pubkey.c
pgp-s2k.c
pgp.c
pgp.h Add functions for dealing with PGP armor header lines to pgcrypto. 2014-10-01 16:03:39 +03:00
px-crypt.c
px-crypt.h
px-hmac.c
px.c
px.h
random.c
rijndael.c
rijndael.h
rijndael.tbl
sha1.c
sha1.h
sha2.c
sha2.h