Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tg3dO-007MPo-58 for pgsql-bugs@arkaria.postgresql.org; Thu, 06 Feb 2025 15:17:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tg3dM-008Xni-HU for pgsql-bugs@arkaria.postgresql.org; Thu, 06 Feb 2025 15:17:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tg3dM-008Xna-9N for pgsql-bugs@lists.postgresql.org; Thu, 06 Feb 2025 15:17:40 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tg3dJ-003yKe-0S for pgsql-bugs@lists.postgresql.org; Thu, 06 Feb 2025 15:17:39 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 516FHZbv1085623; Thu, 6 Feb 2025 10:17:35 -0500 From: Tom Lane To: dan-eli@mail.ru cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18797: pointer te->defn not checked for NULL In-reply-to: <18797-e48e5e7be4954d72@postgresql.org> References: <18797-e48e5e7be4954d72@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Thu, 06 Feb 2025 11:28:22 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1085621.1738855055.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 06 Feb 2025 10:17:35 -0500 Message-ID: <1085622.1738855055@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > in function PGTYPEStimestamp_defmt_scan there is a usage of pgtypes_allo= c(). > 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 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@postg= respro.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