postgresql/src
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
..
backend Add nkeys parameter to recheck_matched_pk_tuple() 2026-04-09 14:45:31 +09:00
bin pg_upgrade: Check for unsupported encodings. 2026-04-08 17:45:09 +12:00
common Remove MULE_INTERNAL encoding. 2026-04-08 17:40:06 +12:00
fe_utils Support more object types within CREATE SCHEMA. 2026-04-06 15:16:25 -04:00
include Reduce presence of syscache.h in src/include/ 2026-04-09 08:49:36 +09:00
interfaces libpq: Split PGOAUTHDEBUG=UNSAFE into multiple options 2026-04-07 08:15:14 -07:00
makefiles Add CONCURRENTLY option to REPACK 2026-04-06 21:55:08 +02:00
pl Remove MULE_INTERNAL encoding. 2026-04-08 17:40:06 +12:00
port Exit early from pg_comp_crc32c_pmull for small inputs 2026-04-08 13:52:14 +07:00
template Switch the semaphore API on Solaris to unnamed POSIX. 2026-03-14 14:10:32 -04:00
test aio: Adjust I/O worker pool automatically. 2026-04-08 19:08:32 +12:00
timezone Use fallthrough attribute instead of comment 2026-02-19 08:51:12 +01:00
tools Remove RADIUS support. 2026-04-08 22:38:43 +12:00
tutorial Force standard_conforming_strings to always be ON. 2026-01-21 15:08:38 -05:00
.gitignore
DEVELOPERS
Makefile Add CONCURRENTLY option to REPACK 2026-04-06 21:55:08 +02:00
Makefile.global.in Update Unicode data to Unicode 17.0.0 2026-03-20 08:42:50 +01:00
Makefile.shlib Restore AIX support. 2026-02-23 13:34:22 -05:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00
nls-global.mk Fix update-po for the PGXS case 2025-10-16 20:21:05 +02:00