Re: BUG #18799: /src/interfaces/ecpg/pgtypeslib/timestamp.c possible NULL deref - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18799: /src/interfaces/ecpg/pgtypeslib/timestamp.c possible NULL deref
Date
Msg-id 1086778.1738855562@sss.pgh.pa.us
Whole thread Raw
In response to BUG #18799: /src/interfaces/ecpg/pgtypeslib/timestamp.c possible NULL deref  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> Pointer, returned from function 'localtime' at timestamp.c:141, may be NULL
> and is dereferenced at timestamp.c:142.In practice this shouldn't be a
> problem, but for strictness it's better to fix this. See
> 'src/bin/initdb/findtimezone.c' for example of proper handling.

I do not see an issue here.  The only defined failure condition for
localtime() is timestamp-out-of-range, and we already checked the
range.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18797: pointer te->defn not checked for NULL
Next
From: David Steele
Date:
Subject: Re: Bug in recovery of drop database?