Re: Seg-fault in format(text) - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Re: Seg-fault in format(text)
Date
Msg-id 4DDAB5DE.5000801@enterprisedb.com
Whole thread Raw
In response to Re: Seg-fault in format(text)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On 23.05.2011 18:36, Tom Lane wrote:
> Heikki Linnakangas<heikki.linnakangas@enterprisedb.com>  writes:
>> It's a stretch that we'd ever support two billion arguments in any form,
>> but an explicit check for "arg<  0" would make me feel better.
>
> No objection here, especially since I've just determined that bug #6035
> is also some kind of unhandled-overflow problem...

Committed, using your suggested fix. I realized that switching to
strtoul() wouldn't work without some further changes, because the format
string is not null-terminated.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

pgsql-bugs by date:

Previous
From: "Martin A. Brooks"
Date:
Subject: Re: BUG #6028: age() function output contracts "months", but not any other units.
Next
From: "Kevin Grittner"
Date:
Subject: Re: BUG #6028: age() function output contracts "months", but not any other units.