]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 23 Oct 2025 16:32:06 +0000 (12:32 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 23 Oct 2025 16:32:31 +0000 (12:32 -0400)
commita8838689594d95a3c6342cb86b2be8a3add2d4d1
tree1a9d549b1c204300709373b317f512cc7e22cee4
parentcbfd4d0f883d5214d06a112912227fa41fc60fb6
Fix off-by-one Asserts in FreePageBtreeInsertInternal/Leaf.

These two functions expect there to be room to insert another item
in the FreePageBtree's array, but their assertions were too weak
to guarantee that.  This has little practical effect granting that
the callers are not buggy, but it seems to be misleading late-model
Coverity into complaining about possible array overrun.

Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/799984.1761150474@sss.pgh.pa.us
Backpatch-through: 13
src/backend/utils/mmgr/freepage.c