pgsql: Fix overflow in bsearch_arg() with more than INT_MAX elements - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Fix overflow in bsearch_arg() with more than INT_MAX elements
Date
Msg-id E1t5Ocb-002q7T-2O@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix overflow in bsearch_arg() with more than INT_MAX elements

This was introduced in commit bfa2cee784, which replaced the old
bsearch_cmp() function we had in extended_stats.c with the current
implementation. The original discussion or commit message of
bfa2cee784 didn't mention where the new implementation came from, but
based on some googling, I'm guessing *BSD or libiberty, all of which
share this same code, with or without this fix.

Author: Ranier Vilela
Reviewed-by: Nathan Bossart
Backpatch-through: 14
Discussion:
https://www.postgresql.org/message-id/CAEudQAp34o_8u6sGSVraLwuMv9F7T9hyHpePXHmRaxR2Aboi%2Bw%40mail.gmail.com

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/07ca2d4110d474669fa03203782b5dae24f1c5c6

Modified Files
--------------
src/port/bsearch_arg.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Restore missing line to copyright notice
Next
From: Robert Haas
Date:
Subject: Re: pgsql: Implement pg_wal_replay_wait() stored procedure