Re: BUG #4015: uninitialized value passed as an argument to tm2timetz

From: Ted Kremenek <kremenek(at)apple(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4015: uninitialized value passed as an argument to tm2timetz
Date: 2008-03-06 08:03:24
Message-ID: 20DE0DDC-FB70-4A33-9499-D41FC5F305BA@apple.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


On Mar 5, 2008, at 10:10 PM, Tom Lane wrote:

> "Ted Kremenek" <kremenek(at)apple(dot)com> writes:
>> It appears that there may be a case where the function tm2timetz is
>> called
>> with an uninitialized (i.e., undefined) value passed as one of its
>> arguments
>> (actually multiple arguments are undefined).
>
> I think you're assuming DateTimeParseError() will return, which it
> will
> not (it always throws ereport(ERROR)). Or have I missed something?
>
> regards, tom lane

Thanks Tom.

After your comments I looked more closely at ereport. It's a little
buried, but I can see that when errstart (wrapped by ereport) is
called with ERROR that it does not return.

Thanks for the quick response.

Ted

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2008-03-06 16:08:15 Re: BUG #3909: src\tools\msvc\clean.bat clears parse.h file
Previous Message Tom Lane 2008-03-06 06:10:38 Re: BUG #4015: uninitialized value passed as an argument to tm2timetz