]> granicus.if.org Git - postgresql/commit
Loop when necessary in contrib/pgcrypto's pktreader_pull().
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 11 Nov 2014 22:22:15 +0000 (17:22 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 11 Nov 2014 22:22:30 +0000 (17:22 -0500)
commit1c73485c695af2dfa7a7f7bec6e1ab8d4eaab7ab
treedfa453812d21f4efb60d40f3fa07d30215c1aa66
parent951c2f6faf00a00ab824699c96376d1d8f5acc57
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.
contrib/pgcrypto/expected/pgp-decrypt.out
contrib/pgcrypto/pgp-decrypt.c
contrib/pgcrypto/sql/pgp-decrypt.sql