pgsql: Add missing error handling in pg_md5_hash(). - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Add missing error handling in pg_md5_hash().
Date
Msg-id E1ngbMr-0019IZ-DU@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/587de223f03e6086d511dab16b17406eb21277ce

Modified Files
--------------
src/common/md5_common.c | 13 +++++++++++++
1 file changed, 13 insertions(+)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Avoid invalid array reference in transformAlterTableStmt().
Next
From: Amit Kapila
Date:
Subject: pgsql: Fix the check to limit sync workers.