From: Tom Lane <tgl@sss.pgh.pa.us>
To: dan-eli@mail.ru
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18797: pointer te->defn not checked for NULL
Date: Thu, 06 Feb 2025 10:17:35 -0500
Message-ID: <1085622.1738855055@sss.pgh.pa.us> (raw)
In-Reply-To: <18797-e48e5e7be4954d72@postgresql.org>
References: <18797-e48e5e7be4954d72@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> in function PGTYPEStimestamp_defmt_scan there is a usage of pgtypes_alloc().
> In other functions the result of pgtypes_alloc is being checked for NULL.
Thanks for the report! It looks like this was already dealt with
during the v17 cycle:
Author: Michael Paquier <michael@paquier.xyz>
Branch: master Release: REL_17_BR [0a9118ccc] 2024-02-19 09:05:51 +0900
ecpg: Fix error handling on OOMs when parsing timestamps
pgtypes_alloc() can return NULL when failing an allocation, which is
something that PGTYPEStimestamp_defmt_asc() has forgotten about when
translating a timestamp for 'D', 'r', 'R' and 'T' as these require a
temporary allocation.
This is unlikely going to be a problem in practice, so no backpatch is
done.
Author: Oleg Tselebrovskiy
Discussion: https://postgr.es/m/bf47888585149f83b276861a1662f7e4@postgrespro.ru
I tend to agree with Michael's conclusion that an error here is
improbable enough to not justify a back-patch.
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 #18797: pointer te->defn not checked for NULL
In-Reply-To: <1085622.1738855055@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