From: Tom Lane <tgl@sss.pgh.pa.us>
To: dan-eli@mail.ru
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18799: /src/interfaces/ecpg/pgtypeslib/timestamp.c possible NULL deref
Date: Thu, 06 Feb 2025 10:26:02 -0500
Message-ID: <1086778.1738855562@sss.pgh.pa.us> (raw)
In-Reply-To: <18799-c0cb1a5e90958485@postgresql.org>
References: <18799-c0cb1a5e90958485@postgresql.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, dan-eli@mail.ru, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18799: /src/interfaces/ecpg/pgtypeslib/timestamp.c possible NULL deref
In-Reply-To: <1086778.1738855562@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox