public inbox for [email protected]  
help / color / mirror / Atom feed
From: Heikki Linnakangas <[email protected]>
To: [email protected]
Subject: pgsql: libpq: Make error checks in the new buffer draining code more ro
Date: Thu, 09 Jul 2026 15:51:22 +0000
Message-ID: <[email protected]> (raw)

libpq: Make error checks in the new buffer draining code more robust

Check explicitly for pqsecure_read() returning an error. It shouldn't
fail, and we would've caught it in the check for a short read, but
better to be explicit so that the error message is more informative.
We also shouldn't update 'inEnd' when the read fails, although that
too is just pro forma as we will bail out and close the connection on
error.

Reported-by: Peter Eisentraut <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]
Backpatch-through: 14

Branch
------
REL_17_STABLE

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

Modified Files
--------------
src/interfaces/libpq/fe-misc.c   | 11 ++++++++---
src/interfaces/libpq/fe-secure.c |  5 +++--
2 files changed, 11 insertions(+), 5 deletions(-)



view thread (7+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: libpq: Make error checks in the new buffer draining code more ro
  In-Reply-To: <[email protected]>

* 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