Fix for psql core dumping on bad user

From: "D(dot) Hageman" <dhageman(at)dracken(dot)com>
To: <pgsql-patches(at)postgresql(dot)org>
Subject: Fix for psql core dumping on bad user
Date: 2001-04-17 22:39:13
Message-ID: Pine.LNX.4.33.0104171737090.709-300000@typhon.dracken.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


The postgresql interactive terminal will dump core on any script that is
run via the -f command line option if their exists a connect line without
a valid user. An example connect line is in one of the attached files.
The user that I have choosen is just testuser, you will see what I mean if
you just run that script on any database you have on your system, assuming
that you don't have a user called testuser. If you do, change the
username and see what happens. This bug has been in psql for the last
couple of versions that I have tested.

Also attached is a patch that seems to correct the issue. I admit that I
haven't studied the code long enough to determine if the fix is suitable,
but I feel that it will give you something to work from if it is not.

--
//===================================================================\\
|| D. Hageman <dhageman(at)dracken(dot)com> ||
\\===================================================================//

Attachment Content-Type Size
example.sql text/plain 23 bytes
psql-core.patch text/plain 645 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-04-17 23:21:38 Re: three VERY minor things with 7.1 final
Previous Message David George 2001-04-17 22:18:29 three VERY minor things with 7.1 final

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2001-04-17 23:32:45 Re: Fix for psql core dumping on bad user
Previous Message Kyle VanderBeek 2001-04-17 18:29:27 Re: Large Object problems (was Re: JDBC int8 hack)