aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-08-21 18:41:52 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2012-08-21 18:41:52 -0400
commit10685ec082181b285a48d982b4c3463fd80ee5ae (patch)
treeb063784433d4dc489e2230fb2f8427711d5a2a1c /doc/src
parent0f524ea0cf388a149f362e48a33c01662eeddc04 (diff)
downloadpostgresql-10685ec082181b285a48d982b4c3463fd80ee5ae.tar.gz
postgresql-10685ec082181b285a48d982b4c3463fd80ee5ae.zip
Avoid somewhat-theoretical overflow risks in RecordIsValid().
This improves on commit 51fed14d73ed3acd2282b531fb1396877e44e86a by eliminating the assumption that we can form <some pointer value> + <some offset> without overflow. The entire point of those tests is that we don't trust the offset value, so coding them in a way that could wrap around if the buffer happens to be near the top of memory doesn't seem sound. Instead, track the remaining space as a size_t variable and compare offsets against that. Also, improve comment about why we need the extra early check on xl_tot_len.
Diffstat (limited to 'doc/src')
0 files changed, 0 insertions, 0 deletions