Re: BUG #16330: psql accesses null pointer in connect.c:do_connect
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, hghwng@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2020-03-31T07:21:53Z
Lists: pgsql-bugs
Attachments
- psql-crash-fix-2.patch (text/x-diff) patch
On Mon, Mar 30, 2020 at 12:48:51PM -0300, Alvaro Herrera wrote: > On 2020-Mar-30, Tom Lane wrote: >> It looks to me like there's a similar hazard a bit further down >> (line 3029): >> >> appendConnStrVal(&connstr, PQdb(o_conn)); >> >> I wonder if we should force reuse_previous to false if there's >> no o_conn, rather than fixing this stuff piecemeal. > > That was my impression too. Good point. What do you think about the attached then? -- Michael
Commits
-
Fix crash in psql when attempting to reuse old connection
- f79bea4b6bcd 12.3 landed
- 8d84dd001239 13.0 landed
-
psql: Show IP address in \conninfo
- 6e5f8d489acc 12.0 cited