Skip site navigation (1) Skip section navigation (2)

Re: BUG #2246: Bad malloc interactions: ecpg, openssl

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Andrew Klosterman <andrew5(at)ece(dot)cmu(dot)edu>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2246: Bad malloc interactions: ecpg, openssl
Date: 2006-02-14 20:51:43
Message-ID: 22462.1139950303@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-patches
Stephen Frost <sfrost(at)snowman(dot)net> writes:
> Another approach would be to have PQsetdbLogin build up a conninfo
> string and pass that into connectOptions1 instead of calling
> connectOptions1 with an empty string and then changing the values
> afterwards.  That'd probably be too large of a change to get in as a
> bugfix though.  An alternative might be to move the pg_fe_getauthname()
> call to connectOptions2 as it's actually a bit more work than one might
> expect and if that can be avoided then that's probably all to the good.

Right offhand I like the idea of pushing it into connectOptions2 --- can
you experiment with that?  Seems like there is no reason to call
Kerberos if the user supplies the name to connect as.

> Sorry I don't have a simple answer. :/  In the end it seems like the
> Kerberos libraries should be able to survive Kerberos not being
> configured or whatever is going on to make it try to malloc 0-bytes...

We may be spending too much time on this one point --- as long as
Kerberos isn't *writing* into the zero-length alloc, there is nothing
illegal immoral or fattening about malloc(0).  Can you get ElectricFence
to not abort right here but continue on to the real problem?

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Andrew KlostermanDate: 2006-02-14 21:02:17
Subject: Re: BUG #2246: Bad malloc interactions: ecpg, openssl
Previous:From: Stephen FrostDate: 2006-02-14 20:49:12
Subject: Re: BUG #2246: Bad malloc interactions: ecpg, openssl

pgsql-patches by date

Next:From: Martijn van OosterhoutDate: 2006-02-14 21:00:50
Subject: Re: Patch Submission Guidelines
Previous:From: Stephen FrostDate: 2006-02-14 20:49:12
Subject: Re: BUG #2246: Bad malloc interactions: ecpg, openssl

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group