summaryrefslogtreecommitdiff
path: root/contrib/jsonb_plperl/jsonb_plperl.c
diff options
context:
space:
mode:
authorMichael Paquier2020-07-22 05:52:23 +0000
committerMichael Paquier2020-07-22 05:52:23 +0000
commit9e108984fb35d8f9e2c2bffa10c0034f9161e802 (patch)
tree0e027e9f992a52f899911718a6421862466431a3 /contrib/jsonb_plperl/jsonb_plperl.c
parenta5073871ea655e37759f22f30c4c70359ad9759b (diff)
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/[email protected] Backpatch-through: 9.5
Diffstat (limited to 'contrib/jsonb_plperl/jsonb_plperl.c')
0 files changed, 0 insertions, 0 deletions