From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: In pg_log_generic(), be more paranoid about preserving errno.
Date: Sat, 06 Jul 2019 15:26:01 +0000
Message-ID: <E1hjmZd-00014Y-Gh@gemulon.postgresql.org> (raw)
In pg_log_generic(), be more paranoid about preserving errno.
This code failed to account for the possibility that malloc() would
change errno, resulting in wrong output for %m, not to mention the
possibility of message truncation. Such a change is obviously
expected when malloc fails, but there's reason to fear that on some
platforms even a successful malloc call can modify errno.
Discussion: https://postgr.es/m/2576.1527382833@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/fb30c9c1c5c36989d6b93906986358cb96936d64
Modified Files
--------------
src/common/logging.c | 2 ++
1 file changed, 2 insertions(+)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: In pg_log_generic(), be more paranoid about preserving errno.
In-Reply-To: <E1hjmZd-00014Y-Gh@gemulon.postgresql.org>
References: <E1hjmZd-00014Y-Gh@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox