1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-21 15:54:08 +03:00
Michael Paquier bba2e66aec 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
2020-07-22 14:52:46 +09:00
..
2010-09-20 22:08:53 +02:00
2010-09-20 22:08:53 +02:00
2019-07-01 10:00:23 +09:00
2017-06-21 15:35:54 -04:00
2019-05-22 13:04:48 -04:00
2019-05-22 12:55:34 -04:00
2017-06-21 15:19:25 -04:00
2017-02-06 11:33:58 +02:00
2019-05-22 13:04:48 -04:00
2019-02-14 17:00:25 +01:00
2017-06-21 15:19:25 -04:00
2016-09-30 14:04:16 -04:00
2014-05-06 12:12:18 -04:00
2019-05-22 13:04:48 -04:00
2014-05-06 12:12:18 -04:00
2017-02-06 11:33:58 +02:00
2014-05-06 12:12:18 -04:00
2017-06-21 15:35:54 -04:00
2014-05-06 12:12:18 -04:00
2014-05-06 12:12:18 -04:00
2019-05-22 13:04:48 -04:00
2019-05-22 13:04:48 -04:00
2014-05-06 12:12:18 -04:00
2017-06-21 15:19:25 -04:00
2017-06-21 15:19:25 -04:00
2017-06-21 15:19:25 -04:00