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

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

Commit: 28782d7e3b923a9eb9e1063c6e3cc69e167fad11
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2018-05-21T04:32:39Z
Releases: 10.5
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 :-(.

Files

PathChange+/−
src/backend/libpq/auth.c modified +3 −1