diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2015-01-30 13:05:07 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2015-01-30 13:05:07 -0500 |
commit | 8f51c432cd6cc21f36e9dd9b15695869e73cd0d0 (patch) | |
tree | ac91fe00003509a0a93eb864b456ea0cb8c25bd4 /src/backend/tcop/postgres.c | |
parent | c01a56c884462f4ae09254db1f270032f9602b8c (diff) | |
download | postgresql-8f51c432cd6cc21f36e9dd9b15695869e73cd0d0.tar.gz postgresql-8f51c432cd6cc21f36e9dd9b15695869e73cd0d0.zip |
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
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions