Re: Potential NULL dereference found in typecmds.c

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Peter Geoghegan <peter(at)2ndquadrant(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Michael Mueller <mmueller(at)vigilantsw(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Potential NULL dereference found in typecmds.c
Date: 2011-07-06 01:26:28
Message-ID: 1309915478-sup-8484@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Excerpts from Alvaro Herrera's message of lun jul 04 11:12:32 -0400 2011:
> Excerpts from Heikki Linnakangas's message of lun jul 04 09:14:11 -0400 2011:
> > On 04.07.2011 16:07, Peter Geoghegan wrote:
>
> > That error message is bogus anyway:
> >
> > > if (!found)
> > > ereport(ERROR,
> > > (errcode(ERRCODE_UNDEFINED_OBJECT),
> > > errmsg("constraint \"%s\" of domain \"%s\" does not exist",
> > > constrName, NameStr(con->conname))));
> >
> > It passes con->conname as the name of the domain, which is just wrong.
> > It should be TypeNameToString(typename) instead. The second error
> > message that follows has the same bug.
>
> Um, evidently this code has a problem. I'll fix.

I forgot to close this: I applied Heikki's suggested fix yesterday.
Thanks for the report.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2011-07-06 02:10:23 weird cast behavior in "IN (values)" clause
Previous Message Fujii Masao 2011-07-06 01:13:35 Re: Cascade replication