aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/json.c
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2019-04-25 12:50:37 -0700
committerPeter Geoghegan <pg@bowt.ie>2019-04-25 12:50:37 -0700
commita9ce839a31375a6c04189222706ae6b2abe96919 (patch)
tree235f9fd79778ba8db7479e4eefa4b73367138021 /src/backend/utils/adt/json.c
parent05b38c7e63d1c8bca8c07ab4c8b194eed3c50ec7 (diff)
downloadpostgresql-a9ce839a31375a6c04189222706ae6b2abe96919.tar.gz
postgresql-a9ce839a31375a6c04189222706ae6b2abe96919.zip
Sanitize line pointers within contrib/amcheck.
Adopt a more defensive approach to accessing index tuples in contrib/amcheck: verify that each line pointer looks sane before accessing associated tuple using pointer arithmetic based on line pointer's offset. This avoids undefined behavior and assertion failures in cases where line pointers are corrupt. Issue spotted following a complaint about an assertion failure by Grigory Smolkin, which involved a test harness that deliberately corrupts indexes. This is arguably a bugfix, but no backpatch given the lack of field reports beyond Grigory's. Discussion: https://postgr.es/m/CAH2-WzmkurhCqnyLHxk0VkOZqd49+ZZsp1xAJOg7j2x7dmp_XQ@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/json.c')
0 files changed, 0 insertions, 0 deletions