agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix null-pointer crash in ECPG compiler.
Date: Thu, 25 Jun 2026 20:58:33 +0000
Message-ID: <E1wcr9d-000CRr-1T@gemulon.postgresql.org> (raw)
Fix null-pointer crash in ECPG compiler.
When compiling a DECLARE section containing a union nested
inside a struct, ecpg passes a null value for struct_sizeof to
ECPGmake_struct_type. I (tgl) didn't foresee that case in
commit 0e6060790, and wrote an unprotected mm_strdup() call.
Reported-by: iMSA (via Jehan-Guillaume de Rorthais <jgdr@dalibo.com>)
Author: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/20260625114849.34b2148e@karst
Backpatch-through: 18
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/7f5e0b22e5eabf7b794b5059efa9454ba3616afe
Modified Files
--------------
src/interfaces/ecpg/preproc/type.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
view thread (2+ messages) latest in thread
Message-ID: <E1wcr9d-000CRr-1T@gemulon.postgresql.org>
Permalink: ../E1wcr9d-000CRr-1T@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wcr9d-000CRr-1T@gemulon.postgresql.org
reply
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-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix null-pointer crash in ECPG compiler.
In-Reply-To: <E1wcr9d-000CRr-1T@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox