pgpool: Fix possible integer overflow.

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgpool-committers(at)lists(dot)postgresql(dot)org
Subject: pgpool: Fix possible integer overflow.
Date: 2025-12-23 06:15:19
Message-ID: E1vXvfy-007loB-2Q@gothos.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgpool-committers

Fix possible integer overflow.

In pool_write_flush() and pool_flus_it() write(2) is used. write(2)
returns ssize_t and in the code there are some places where the return
value was assigned to an int variable. As a result it was possible
that the return value was evaluated to negative value, which led to an
error.

Backpatch-through: v4.3

Branch
------
V4_5_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=5a9864d551e7056ac37f44e6ae2807a5bee283c6

Modified Files
--------------
src/utils/pool_stream.c | 49 +++++++++++++++++++++++--------------------------
1 file changed, 23 insertions(+), 26 deletions(-)

Browse pgpool-committers by date

  From Date Subject
Next Message Tatsuo Ishii 2025-12-23 06:15:24 pgpool: Fix possible integer overflow.
Previous Message Tatsuo Ishii 2025-12-23 06:15:13 pgpool: Fix possible integer overflow.