From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix fuzzy error handling in pg_basebackup when opening gzFile
Date: Tue, 04 Feb 2020 04:57:58 +0000
Message-ID: <E1iyqHe-0005i0-6U@gemulon.postgresql.org> (raw)
Fix fuzzy error handling in pg_basebackup when opening gzFile
First, this code did not bother checking for a failure when calling
dup(). Then, per zlib, gzerror() returns NULL for a NULL input, which
can happen if passing down to gzdopen() an invalid file descriptor or if
there was an allocation failure.
No back-patch is done as this would unlikely be a problem in the field.
Per Coverity.
Reported-by: Tom Lane
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/177be9edf4bb966400db7769d61e479aa0fe0201
Modified Files
--------------
src/bin/pg_basebackup/pg_basebackup.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
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: michael@paquier.xyz
Subject: Re: pgsql: Fix fuzzy error handling in pg_basebackup when opening gzFile
In-Reply-To: <E1iyqHe-0005i0-6U@gemulon.postgresql.org>
References: <E1iyqHe-0005i0-6U@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