aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2020-12-08 15:22:12 +0900
committerMichael Paquier <michael@paquier.xyz>2020-12-08 15:22:12 +0900
commit28d1601ad988790c3c53d7ffd24ef6d2366d4457 (patch)
tree392a32d6ec635230e60571b71db0f95005a722f4 /src
parent5da871bfa1ba41768ecd7786293d9b81dcf1b667 (diff)
downloadpostgresql-28d1601ad988790c3c53d7ffd24ef6d2366d4457.tar.gz
postgresql-28d1601ad988790c3c53d7ffd24ef6d2366d4457.zip
pgcrypto: Detect errors with EVP calls from OpenSSL
The following routines are called within pgcrypto when handling digests but there were no checks for failures: - EVP_MD_CTX_size (can fail with -1 as of 3.0.0) - EVP_MD_CTX_block_size (can fail with -1 as of 3.0.0) - EVP_DigestInit_ex - EVP_DigestUpdate - EVP_DigestFinal_ex A set of elog(ERROR) is added by this commit to detect such failures, that should never happen except in the event of a processing failure internal to OpenSSL. Note that it would be possible to use ERR_reason_error_string() to get more context about such errors, but these refer mainly to the internals of OpenSSL, so it is not really obvious how useful that would be. This is left out for simplicity. Per report from Coverity. Thanks to Tom Lane for the discussion. Backpatch-through: 9.5
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions