From: Michael Meskes <meskes@postgresql.org>
To: bianpan2016@163.com
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15104: Double free in the main function in ecpg.c
Date: Fri, 09 Mar 2018 17:33:31 +0100
Message-ID: <1520613211.2488.140.camel@postgresql.org> (raw)
In-Reply-To: <152056012010.4963.4379808667664715171@wrigleys.postgresql.org>
References: <152056012010.4963.4379808667664715171@wrigleys.postgresql.org>
> Details: In function main(), the memory hold by variable
> output_filename is
> freed at line 329. It then tries to parse the next command option.
> The freed
> memory will be freed again at line 478 if a crafted option bypass the
> memory
> allocation at line 316. I think set output_filename to NULL after the
> free
> operation at line 329 will fix the issue.
> ...
I haven't had time yet to look into this, but to speed things up, would
you have an example where the double free actually happens?
Thanks.
Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL
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-bugs@postgresql.org
Cc: meskes@postgresql.org, bianpan2016@163.com
Subject: Re: BUG #15104: Double free in the main function in ecpg.c
In-Reply-To: <1520613211.2488.140.camel@postgresql.org>
References: <152056012010.4963.4379808667664715171@wrigleys.postgresql.org> <1520613211.2488.140.camel@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