[COMMITTERS] pgsql: Fix access-off-end-of-array in clog.c. - Mailing list pgsql-committers

From Tom Lane
Subject [COMMITTERS] pgsql: Fix access-off-end-of-array in clog.c.
Date
Msg-id E1e0VMi-0008H0-0Q@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix access-off-end-of-array in clog.c.

Sloppy loop coding in set_status_by_pages() resulted in fetching one array
element more than it should from the subxids[] array.  The odds of this
resulting in SIGSEGV are pretty small, but we've certainly seen that happen
with similar mistakes elsewhere.  While at it, we can get rid of an extra
TransactionIdToPage() calculation per loop.

Per report from David Binderman.  Back-patch to all supported branches,
since this code is quite old.

Discussion: https://postgr.es/m/HE1PR0802MB2331CBA919CBFFF0C465EB429C710@HE1PR0802MB2331.eurprd08.prod.outlook.com

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/69e931f96ef47e14c62e32b91726ed0d6e7f3d73

Modified Files
--------------
src/backend/access/transam/clog.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)


--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: [COMMITTERS] pgsql: Fix access-off-end-of-array in clog.c.
Next
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Basic partition-wise join functionality.