pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: ecpg: fix more minor mishandling of bad input in preprocessor.
Date: Thu, 17 Oct 2024 19:28:39 +0000
Message-ID: <E1t1WAp-001HHN-Uf@gemulon.postgresql.org> (raw)

ecpg: fix more minor mishandling of bad input in preprocessor.

Don't get confused by an unmatched right brace in the input.
(Previously, this led to discarding information about file-level
variables and then possibly crashing.)

Detect, rather than crash on, an attempt to index into a non-array
variable.

As before, in the absence of field complaints I'm not too
excited about back-patching these.

Per valgrind testing by Alexander Lakhin.

Discussion: https://postgr.es/m/a239aec2-6c79-5fc9-9272-cea41158a360@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1fed234f9faf1071d925434c5e9c14688fb4c77e

Modified Files
--------------
src/interfaces/ecpg/preproc/ecpg.trailer | 13 ++++++++-----
src/interfaces/ecpg/preproc/variable.c   |  3 ++-
2 files changed, 10 insertions(+), 6 deletions(-)



Message-ID: <E1t1WAp-001HHN-Uf@gemulon.postgresql.org>
Permalink:  ../E1t1WAp-001HHN-Uf@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1t1WAp-001HHN-Uf@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: ecpg: fix more minor mishandling of bad input in preprocessor.
  In-Reply-To: <E1t1WAp-001HHN-Uf@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox