aboutsummaryrefslogtreecommitdiff
path: root/src/common/file_utils.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2020-07-22 14:52:46 +0900
committerMichael Paquier <michael@paquier.xyz>2020-07-22 14:52:46 +0900
commitbba2e66aec4c8af4ad8b3be0d7cde1a97c974a00 (patch)
tree1e4ec7e62c74333de1d475ccef415d54ebe61202 /src/common/file_utils.c
parent171633ff5d8e21ceda5d824f3c9f13aa18a78505 (diff)
downloadpostgresql-bba2e66aec4c8af4ad8b3be0d7cde1a97c974a00.tar.gz
postgresql-bba2e66aec4c8af4ad8b3be0d7cde1a97c974a00.zip
Fix corner case with PGP decompression in pgcrypto
A compressed stream may end with an empty packet, and PGP decompression finished before reading this empty packet in the remaining stream. This caused a failure in pgcrypto, handling this case as corrupted data. This commit makes sure to consume such extra data, avoiding a failure when decompression the entire stream. This corner case was reproducible with a data length of 16kB, and existed since its introduction in e94dd6a. A cheap regression test is added to cover this case. Thanks to Jeff Janes for the extra investigation. Reported-by: Frank Gagnepain Author: Kyotaro Horiguchi, Michael Paquier Discussion: https://postgr.es/m/16476-692ef7b84e5fb893@postgresql.org Backpatch-through: 9.5
Diffstat (limited to 'src/common/file_utils.c')
0 files changed, 0 insertions, 0 deletions