pgsql: Fix unsafe usage of strerror(errno) within ereport().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix unsafe usage of strerror(errno) within ereport().
Date: 2018-05-21 04:33:04
Message-ID: E1fKcVM-0008S0-QR@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix unsafe usage of strerror(errno) within ereport().

This is the converse of the unsafe-usage-of-%m problem: the reason
ereport/elog provide that format code is mainly to dodge the hazard
of errno getting changed before control reaches functions within the
arguments of the macro. I only found one instance of this hazard,
but it's been there since 9.4 :-(.

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/28782d7e3b923a9eb9e1063c6e3cc69e167fad11

Modified Files
--------------
src/backend/libpq/auth.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2018-05-21 14:26:16 pgsql: pg_basebackup: Remove short option -k
Previous Message Tom Lane 2018-05-20 22:06:49 pgsql: Fix unportable usage of printf("%m").