Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XoFuY-0005Dt-K4 for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Nov 2014 18:11:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XoFuX-0006HG-W8 for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Nov 2014 18:11:26 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XoFuW-0006H9-TS for pgsql-bugs@postgresql.org; Tue, 11 Nov 2014 18:11:25 +0000 Received: from mail-lb0-f181.google.com ([209.85.217.181]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XoFuT-0003cV-EF for pgsql-bugs@postgresql.org; Tue, 11 Nov 2014 18:11:22 +0000 Received: by mail-lb0-f181.google.com with SMTP id l4so7978021lbv.26 for ; Tue, 11 Nov 2014 10:11:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=JV3S2G2Fvx6idPQrg9FrX7hzF5NmRf590M3nEOONcSA=; b=TCLvkhXk6FwulZ773et9PN070BRszMwboeeg66aQF26fwl+kuyq3TiD9qOgcrKXFmo SdLVUlWNh13Jzs8XZRv4YqeSRVQ3HplSo65oroEPpQQJSgLLMlAOeavU3BfmdRyYjZuw E2RNdeDorWQxe7Pikc3TzrUKTNM0O9/JwKeWaSnj/Uy1jY/85MHc6InjKojslDSKqtQp th56wB0yxgLbn/XFxEffG2gbZNEPWYnmvk+zdkdrc1d1czWXXM3/8dohqIjQtIj1/OR2 87CxiVcaBk04/CRdoMDvoUAJ4J5KYeurUevLTZ5Al1jCDfB380+Zjp38ZdJ5aNiAnVai RL1A== X-Gm-Message-State: ALoCoQmCXGmnb0+BJjhUXWke7dEVlaweQo3c7pV6P8BzGOYBqQFr1RhuZcA2QAgGEtT87vFlkv5y X-Received: by 10.112.151.70 with SMTP id uo6mr37163740lbb.2.1415729478825; Tue, 11 Nov 2014 10:11:18 -0800 (PST) Received: from [172.20.10.2] (c-5eeaaa38-74736162.cust.telenor.se. [94.234.170.56]) by mx.google.com with ESMTPSA id ny6sm6152704lbb.2.2014.11.11.10.11.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Nov 2014 10:11:18 -0800 (PST) Message-ID: <54625148.2060105@joh.to> Date: Tue, 11 Nov 2014 19:11:20 +0100 From: Marko Tiikkaja User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Jeff Janes , connor.penhale@openlogic.com CC: Pg Bugs Subject: Re: BUG #11905: "Error: Wrong key or corrupt data" with pgp_sym_decrypt when bytea size is 2^x - 6 where x >=14 References: <20141107215638.2527.18189@wrigleys.postgresql.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs