aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/bool.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-10-18 20:43:17 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-10-18 20:43:27 -0400
commit9b103f861ea9d74c4c43e80c5c5dfcdc1e61f4a2 (patch)
treed03524be5fa51532cf386e30a8318d87e336cdf9 /src/backend/utils/adt/bool.c
parent7fb355db142958f463f7a0415248184f7ca4503f (diff)
downloadpostgresql-9b103f861ea9d74c4c43e80c5c5dfcdc1e61f4a2.tar.gz
postgresql-9b103f861ea9d74c4c43e80c5c5dfcdc1e61f4a2.zip
Improve pglz_decompress's defenses against corrupt compressed data.
When processing a match tag, check to see if the claimed "off" is more than the distance back to the output buffer start. If it is, then the data is corrupt, and what's more we would fetch from outside the buffer boundaries and potentially incur a SIGSEGV. (Although the odds of that seem relatively low, given that "off" can't be more than 4K.) Back-patch to v13; before that, this function wasn't really trying to protect against bad data. Report and fix by Flavien Guedez. Discussion: https://postgr.es/m/01fc0593-e31e-463d-902c-dd43174acee2@oopacity.net
Diffstat (limited to 'src/backend/utils/adt/bool.c')
0 files changed, 0 insertions, 0 deletions