From: Tom Lane <tgl@sss.pgh.pa.us>
To: bianpan2016@163.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15541: Use after release in PQprint
Date: Fri, 07 Dec 2018 12:52:56 -0500
Message-ID: <15915.1544205176@sss.pgh.pa.us> (raw)
In-Reply-To: <15541-c835d8b9a903f7ad@postgresql.org>
References: <15541-c835d8b9a903f7ad@postgresql.org>
=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> The function PQprint releases the file hander fout via pclose or _pclose
> when usePipe is true. After that, fout is used again to write message
> "fputs("</table>\n", fout);".
Wow, that is ancient. It looks like commit edb519b14 of 27-Jul-1996
added the pipe close stanza in the wrong place, and nobody's noticed
it since. That's probably not so surprising given the multiple
conditions required to trigger it plus the fact that this whole
function is, if not completely dead code, at least not used anywhere
in the PG distribution. Still, we oughta fix it.
Thanks for the report!
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, bianpan2016@163.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15541: Use after release in PQprint
In-Reply-To: <15915.1544205176@sss.pgh.pa.us>
* 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