From: Marko Tiikkaja <marko@joh.to>
To: Jeff Janes <jeff.janes@gmail.com>
To: connor.penhale@openlogic.com
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
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: Tue, 11 Nov 2014 19:11:20 +0100
Message-ID: <54625148.2060105@joh.to> (raw)
In-Reply-To: <CAMkU=1ykOR3A4vOBiuYTKYvB0o9bg9j5r_txNUcLwQKTBQwFrw@mail.gmail.com>
References: <20141107215638.2527.18189@wrigleys.postgresql.org>
<CAMkU=1ykOR3A4vOBiuYTKYvB0o9bg9j5r_txNUcLwQKTBQwFrw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
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?
inline patch 1: contrib/pgcrypto/pgp-decrypt.c (+1/-0 lines) download inline-1.patch*** a/contrib/pgcrypto/pgp-decrypt.c
--- b/contrib/pgcrypto/pgp-decrypt.c
***************
*** 182,188 **** pktreader_pull(void *priv, PullFilter *src, int len,
if (pkt->type == PKT_CONTEXT)
return pullf_read(src, len, data_p);
! if (pkt->len == 0)
{
/* this was last chunk in stream */
if (pkt->type == PKT_NORMAL)
--- 182,188 ----
if (pkt->type == PKT_CONTEXT)
return pullf_read(src, len, data_p);
! while (pkt->len == 0)
{
/* this was last chunk in stream */
if (pkt->type == PKT_NORMAL)
.marko
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: marko@joh.to, jeff.janes@gmail.com, connor.penhale@openlogic.com
Subject: Re: BUG #11905: "Error: Wrong key or corrupt data" with pgp_sym_decrypt when bytea size is 2^x - 6 where x >=14
In-Reply-To: <54625148.2060105@joh.to>
References: <20141107215638.2527.18189@wrigleys.postgresql.org> <CAMkU=1ykOR3A4vOBiuYTKYvB0o9bg9j5r_txNUcLwQKTBQwFrw@mail.gmail.com> <54625148.2060105@joh.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox