Add missing error handling in pg_md5_hash().

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 587de223f03e6086d511dab16b17406eb21277ce
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2022-04-19T00:04:55Z
Releases: 15.0
Add missing error handling in pg_md5_hash().

It failed to provide an error string as expected for the
admittedly-unlikely case of OOM in pg_cryptohash_create().
Also, make it initialize *errstr to NULL for success,
as pg_md5_binary() does.

Also add missing comments.  Readers should not have to
reverse-engineer the API spec for a publicly visible routine.

Files

PathChange+/−
src/common/md5_common.c modified +13 −0