pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: ecpg: Add missing NULL check in ecpg_store_input() following OOM
Date: Thu, 20 Aug 2026 23:33:33 +0000
Message-ID: <E1wxCGK-00000001QGl-0d4P@gemulon.postgresql.org> (raw)

ecpg: Add missing NULL check in ecpg_store_input() following OOM failure

ecpg_store_input() called strlen() directly on the result of
PGTYPESnumeric_to_asc() without checking for a NULL value, state
possible when the function fails due to an out-of-memory failure.

This error is unlikely going to be hit in practice, so no backpatch is
done.

Author: Gladyshev Ilya <ilya.gladyshev@linux.dev>
Discussion: https://postgr.es/m/ed5a633b469e685f3a1aef9982cff8e1c50e5883@linux.dev

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c83f7e727f20a680a5bb874e2e4d699a0f3ee68f

Modified Files
--------------
src/interfaces/ecpg/ecpglib/execute.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)



Message-ID: <E1wxCGK-00000001QGl-0d4P@gemulon.postgresql.org>
Permalink:  ../E1wxCGK-00000001QGl-0d4P@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wxCGK-00000001QGl-0d4P@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: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: ecpg: Add missing NULL check in ecpg_store_input() following OOM
  In-Reply-To: <E1wxCGK-00000001QGl-0d4P@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