aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-01-30 13:04:59 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2015-01-30 13:04:59 -0500
commit70da7aeba1f845d2f0bb864031e0bea21b384ca7 (patch)
treeecb3b20a12310cb930bd074e2a6df3179eb4b39c /src/backend/tcop/postgres.c
parentb6a164e5cb389a52b2187bbacdcdaab46e236418 (diff)
downloadpostgresql-70da7aeba1f845d2f0bb864031e0bea21b384ca7.tar.gz
postgresql-70da7aeba1f845d2f0bb864031e0bea21b384ca7.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