pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedpostgresql-10.0/src/backend/access/transam/clog.c:234: sanity check after use ?
2+ messages / 2 participants
[nested] [flat]
Commits from this thread:
2017-10-06 69e931f96e c7c93dd55a c209b5034e d45fb6e9d8 6d2ef1cb99 4c20ee5f27 6b87416c9a Fix access-off-end-of-array in clog.c.
* postgresql-10.0/src/backend/access/transam/clog.c:234: sanity check after use ?
@ 2017-10-06 15:15 David Binderman <dcb314@hotmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: David Binderman @ 2017-10-06 15:15 UTC (permalink / raw)
To: pgsql-bugs
Hello there,
postgresql-10.0/src/backend/access/transam/clog.c:234]: (style) Array index 'i' is used before limits check.
Source code is
while (TransactionIdToPage(subxids[i]) == pageno && i < nsubxids)
Maybe it is better to sanity check the array index before use, not after.
Regards
David Binderman
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: postgresql-10.0/src/backend/access/transam/clog.c:234: sanity check after use ?
@ 2017-10-06 15:52 Tom Lane <tgl@sss.pgh.pa.us>
parent: David Binderman <dcb314@hotmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2017-10-06 15:52 UTC (permalink / raw)
To: David Binderman <dcb314@hotmail.com>; +Cc: pgsql-bugs
David Binderman <dcb314@hotmail.com> writes:
> postgresql-10.0/src/backend/access/transam/clog.c:234]: (style) Array index 'i' is used before limits check.
Yeah, this is pretty bogus, will fix (and the same for your other one).
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2017-10-06 15:52 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-10-06 15:15 postgresql-10.0/src/backend/access/transam/clog.c:234: sanity check after use ? David Binderman <dcb314@hotmail.com>
2017-10-06 15:52 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox