Loop when necessary in contrib/pgcrypto's pktreader_pull().
Tom Lane <tgl@sss.pgh.pa.us>
Loop when necessary in contrib/pgcrypto's pktreader_pull(). This fixes a scenario in which pgp_sym_decrypt() failed with "Wrong key or corrupt data" on messages whose length is 6 less than a power of 2. Per bug #11905 from Connor Penhale. Fix by Marko Tiikkaja, regression test case from Jeff Janes.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pgcrypto/expected/pgp-decrypt.out | modified | +8 −0 |
| contrib/pgcrypto/pgp-decrypt.c | modified | +1 −1 |
| contrib/pgcrypto/sql/pgp-decrypt.sql | modified | +4 −0 |