Date: Wednesday, September 30, 2015 @ 02:47:23
  Author: bisson
Revision: 247904

fix FS#46471

Added:
  gnupg/trunk/ssh-agent.patch
Modified:
  gnupg/trunk/PKGBUILD

-----------------+
 PKGBUILD        |    9 ++++++---
 ssh-agent.patch |   42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2015-09-29 22:19:26 UTC (rev 247903)
+++ PKGBUILD    2015-09-30 00:47:23 UTC (rev 247904)
@@ -6,7 +6,7 @@
 
 pkgname=gnupg
 pkgver=2.1.8
-pkgrel=3
+pkgrel=4
 pkgdesc='Complete and free implementation of the OpenPGP standard'
 url='http://www.gnupg.org/'
 license=('GPL')
@@ -21,9 +21,11 @@
               '031EC2536E580D8EA286A9F22071B08A33BD3F06'
               'D238EA65D64C67ED4C3073F28A861B1C7EFD60D9')
 
source=("ftp://ftp.gnupg.org/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2"{,.sig}
-        'ssh-ed25519.patch')
+        'ssh-ed25519.patch'
+        'ssh-agent.patch')
 sha1sums=('61f5bc656dd7fddd4ab67b720d47ef0651bfb727' 'SKIP'
-          'fd77cf366f6bd70c1d33e910044612aebe6bbe63')
+          'fd77cf366f6bd70c1d33e910044612aebe6bbe63'
+          '605f9a1ca5bbb1791c86452d113cb0617ec437e8')
 
 install=install
 
@@ -35,6 +37,7 @@
        cd "${srcdir}/${pkgname}-${pkgver}"
        sed '/noinst_SCRIPTS = gpg-zip/c sbin_SCRIPTS += gpg-zip' -i 
tools/Makefile.in
        patch -p1 -i ../ssh-ed25519.patch
+       patch -p1 -i ../ssh-agent.patch
 }
 
 build() {

Added: ssh-agent.patch
===================================================================
--- ssh-agent.patch                             (rev 0)
+++ ssh-agent.patch     2015-09-30 00:47:23 UTC (rev 247904)
@@ -0,0 +1,42 @@
+diff --git a/agent/agent.h b/agent/agent.h
+index b3e8470..9e066c9 100644
+--- a/agent/agent.h
++++ b/agent/agent.h
+@@ -50,7 +50,8 @@
+ /* The maximum length of a passphrase (in bytes).  Note: this is
+    further contrained by the Assuan line length (and any other text on
+    the same line).  However, the Assuan line length is 1k bytes so
+-   this shouldn't be a problem in practice.  */
++   this shouldn't be a problem in practice.
++   (MAX_PASSPHRASE_LEN + 1) should be multiple of alignment size.  */
+ #define MAX_PASSPHRASE_LEN 255
+ 
+ 
+diff --git a/agent/command-ssh.c b/agent/command-ssh.c
+index 8be1255..3f63f76 100644
+--- a/agent/command-ssh.c
++++ b/agent/command-ssh.c
+@@ -3107,7 +3107,8 @@ ssh_identity_register (ctrl_t ctrl, ssh_key_type_spec_t 
*spec,
+       err = gpg_error_from_syserror ();
+       goto out;
+     }
+-  pi2 = pi + (sizeof *pi + MAX_PASSPHRASE_LEN + 1);
++  pi2 = (struct pin_entry_info_s *)((char *)pi + (sizeof (*pi)
++                                                  + MAX_PASSPHRASE_LEN + 1));
+   pi->max_length = MAX_PASSPHRASE_LEN + 1;
+   pi->max_tries = 1;
+   pi->with_repeat = 1;
+diff --git a/agent/genkey.c b/agent/genkey.c
+index 13858ca..54b7149 100644
+--- a/agent/genkey.c
++++ b/agent/genkey.c
+@@ -375,7 +375,8 @@ agent_ask_new_passphrase (ctrl_t ctrl, const char *prompt,
+     }
+ 
+   pi = gcry_calloc_secure (2, sizeof (*pi) + MAX_PASSPHRASE_LEN + 1);
+-  pi2 = pi + (sizeof *pi + MAX_PASSPHRASE_LEN + 1);
++  pi2 = (struct pin_entry_info_s *)((char *)pi + (sizeof (*pi)
++                                                  + MAX_PASSPHRASE_LEN + 1));
+   pi->max_length = MAX_PASSPHRASE_LEN + 1;
+   pi->max_tries = 3;
+   pi->with_qualitybar = 1;

Reply via email to