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 |
|---|---|
| Тема | Re: BUG #11905: "Error: Wrong key or corrupt data" with pgp_sym_decrypt when bytea size is 2^x - 6 where x >=14 |
| Дата | |
| Msg-id | 54625148.2060105@joh.to обсуждение исходный текст |
| Ответ на | Re: BUG #11905: "Error: Wrong key or corrupt data" with pgp_sym_decrypt when bytea size is 2^x - 6 where x >=14 (Jeff Janes <jeff.janes@gmail.com>) |
| Ответы |
Re: BUG #11905: "Error: Wrong key or corrupt data" with
pgp_sym_decrypt when bytea size is 2^x - 6 where x >=14
|
| Список | pgsql-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?
*** 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
В списке pgsql-bugs по дате отправления: