postgresql/src/backend
Amit Langote e1cc57fabd Add nkeys parameter to recheck_matched_pk_tuple()
The function looped over ii_NumIndexKeyAttrs elements of the skeys
array, but one caller (ri_FastPathFlushArray) passes a one-element
array since it only handles single-column FKs.  The function
signature did not communicate this constraint, which static analysis
flags as a potential out-of-bounds read.

Add an nkeys parameter and assert that it matches
ii_NumIndexKeyAttrs, then use it in the loop.  The call sites
already know the key count.

Reported-by: Evan Montgomery-Recht <montge@mianetworks.net>
Discussion: https://postgr.es/m/CAEg7pwcKf01FmDqFAf-Hzu_pYnMYScY_Otid-pe9uw3BJ6gq9g@mail.gmail.com
2026-04-09 14:45:31 +09:00
..
access Add EXPLAIN (IO) infrastructure with BitmapHeapScan support 2026-04-07 22:33:34 +02:00
archive Don't include wait_event.h in pgstat.h 2026-03-06 16:24:58 +01:00
backup Online enabling and disabling of data checksums 2026-04-03 22:58:51 +02:00
bootstrap Use PG_DATA_CHECKSUM_OFF instead of hardcoded value 2026-04-06 22:11:53 +02:00
catalog Reduce presence of syscache.h in src/include/ 2026-04-09 08:49:36 +09:00
commands Simplify declaration of memcpy target 2026-04-08 22:58:56 +02:00
executor instrumentation: Allocate query level instrumentation in ExecutorStart 2026-04-08 00:06:45 -04:00
foreign Remove bits* typedefs. 2026-03-30 16:12:08 -05:00
jit jit: No backport::SectionMemoryManager for LLVM 22. 2026-04-03 14:55:11 +13:00
lib dshash: Make it possible to suppress out of memory errors 2026-03-19 11:51:17 -04:00
libpq Remove RADIUS support. 2026-04-08 22:38:43 +12:00
main Update copyright for 2026 2026-01-01 13:24:10 -05:00
nodes Mark JumbleState as a const in the post_parse_analyze hook 2026-04-07 15:22:49 +09:00
optimizer Fix volatile function evaluation in eager aggregation 2026-04-06 11:54:08 +09:00
parser Fix WITHOUT OVERLAPS' interaction with domains. 2026-04-07 14:45:37 -04:00
partitioning Thread flags through begin-scan APIs 2026-03-30 12:27:24 -04:00
po Update copyright for 2026 2026-01-01 13:24:10 -05:00
port Use the new shmem allocation functions in a few core subsystems 2026-04-06 02:12:59 +03:00
postmaster aio: Adjust I/O worker pool automatically. 2026-04-08 19:08:32 +12:00
regex Use fallthrough attribute instead of comment 2026-02-19 08:51:12 +01:00
replication Fix slotsync worker blocking promotion when stuck in wait 2026-04-08 11:22:21 +09:00
rewrite Add UPDATE/DELETE FOR PORTION OF 2026-04-01 19:06:03 +02:00
snowball Fix meson build of snowball code. 2026-01-05 16:51:36 -05:00
statistics Add support for importing statistics from remote servers. 2026-04-08 19:15:00 +09:00
storage aio: Adjust I/O worker pool automatically. 2026-04-08 19:08:32 +12:00
tcop instrumentation: Allocate query level instrumentation in ExecutorStart 2026-04-08 00:06:45 -04:00
tsearch Require superuser to install a non-built-in selectivity estimator. 2026-02-09 10:07:31 -05:00
utils Add nkeys parameter to recheck_matched_pk_tuple() 2026-04-09 14:45:31 +09:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile ssl: Serverside SNI support for libpq 2026-03-18 12:37:11 +01:00
meson.build Add CONCURRENTLY option to REPACK 2026-04-06 21:55:08 +02:00
nls.mk Create a separate file listing backend types 2025-09-26 15:21:49 +02:00