Fix and simplify some code related to cryptohashes
Michael Paquier <michael@paquier.xyz>
Fix and simplify some code related to cryptohashes
This commit addresses two issues:
- In pgcrypto, MD5 computation called pg_cryptohash_{init,update,final}
without checking for the result status.
- Simplify pg_checksum_raw_context to use only one variable for all the
SHA2 options available in checksum manifests.
Reported-by: Heikki Linnakangas
Discussion: https://postgr.es/m/f62f26bb-47a5-8411-46e5-4350823e06a5@iki.fi
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pgcrypto/internal.c | modified | +6 −3 |
| src/common/checksum_helper.c | modified | +25 −34 |
| src/include/common/checksum_helper.h | modified | +1 −4 |
Discussion
- Incorrect allocation handling for cryptohash functions with OpenSSL 18 messages · 2020-12-18 → 2021-01-08