Re: BUG #11905: "Error: Wrong key or corrupt data" with pgp_sym_decrypt when bytea size is 2^x - 6 where x >=14 - Mailing list pgsql-bugs

From Jeff Janes
Subject Re: BUG #11905: "Error: Wrong key or corrupt data" with pgp_sym_decrypt when bytea size is 2^x - 6 where x >=14
Date
Msg-id CAMkU=1yA1rMhmfMvZ5e6pKCR1TCWF6Jd5XeeWz5aEcg+AL7PPg@mail.gmail.com
Whole thread Raw
In response to Re: BUG #11905: "Error: Wrong key or corrupt data" with pgp_sym_decrypt when bytea size is 2^x - 6 where x >=14  (Marko Tiikkaja <marko@joh.to>)
Responses Re: BUG #11905: "Error: Wrong key or corrupt data" with pgp_sym_decrypt when bytea size is 2^x - 6 where x >=14  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: BUG #11905: "Error: Wrong key or corrupt data" with pgp_sym_decrypt when bytea size is 2^x - 6 where x >=14  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Tue, Nov 11, 2014 at 10:11 AM, Marko Tiikkaja <marko@joh.to> wrote:
On 2014-11-11 18:52, Jeff Janes wrote:
The problem is that mdc_read is getting invoked with an len argument of 0.
When it successfully reads 0 bytes, it interprets that as an error.  I
can't figure out why it is getting invoked with a length of 0, too many
pointer indirections for me to follow at this time.

This sounds a lot like another bug I've seen.  Can you try this patch?

That fixes it.  I've tested all lengths from 1 to 133,000

I've added a regression test to it, in the attached.
 
How do we go about incorporating it, as far as bumping the extension version-number and such?  Or does it not get bumped at all because there is no change to the interface?

Cheers,

Jeff
Attachment

pgsql-bugs by date:

Previous
From: robert.wysocki@essencedigital.com
Date:
Subject: BUG #11939: Missing "actual time" in auto_explain plans
Next
From: Tom Lane
Date:
Subject: Re: BUG #11939: Missing "actual time" in auto_explain plans