pgsql: Loop when necessary in contrib/pgcrypto's pktreader_pull(). - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Loop when necessary in contrib/pgcrypto's pktreader_pull().
Date
Msg-id E1XoJqC-0005xT-9q@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f2ad2bdd0abfb1ce8f274fbb01a82e209f4cc122

Modified Files
--------------
contrib/pgcrypto/expected/pgp-decrypt.out |    8 ++++++++
contrib/pgcrypto/pgp-decrypt.c            |    2 +-
contrib/pgcrypto/sql/pgp-decrypt.sql      |    4 ++++
3 files changed, 13 insertions(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Loop when necessary in contrib/pgcrypto's pktreader_pull().
Next
From: Robert Haas
Date:
Subject: pgsql: Remove incorrect comment.