git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: a507387) | patch
Fix corner case with PGP decompression in pgcrypto
2020年7月22日 05:52:23 +0000 (14:52 +0900)
2020年7月22日 05:52:23 +0000 (14:52 +0900)
commit 9e108984fb35d8f9e2c2bffa10c0034f9161e802
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
contrib/pgcrypto/expected/pgp-compression.out diff | blob | blame | history
contrib/pgcrypto/pgp-compress.c diff | blob | blame | history
contrib/pgcrypto/sql/pgp-compression.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /