[Pkg-gnupg-commit] [gnupg2] 241/241: fix keystrlen

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Dec 9 20:32:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit d67bb496d9914dc41c491322203db84411c506c2
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Wed Dec 9 12:55:17 2015 -0500

    fix keystrlen
---
 ...en-when-no-keyid-format-option-has-been-g.patch | 34 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 35 insertions(+)

diff --git a/debian/patches/0004-fix-keystrlen-when-no-keyid-format-option-has-been-g.patch b/debian/patches/0004-fix-keystrlen-when-no-keyid-format-option-has-been-g.patch
new file mode 100644
index 0000000..edaa037
--- /dev/null
+++ b/debian/patches/0004-fix-keystrlen-when-no-keyid-format-option-has-been-g.patch
@@ -0,0 +1,34 @@
+From: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
+Date: Wed, 9 Dec 2015 12:51:45 -0500
+Subject: fix keystrlen when no keyid-format option has been given
+
+* g10/keyid.c (keystrlen): if opt.keyid_format has not been set,
+  default to 0xLONG, as is done in format_keyid.
+
+--
+Without this fix, gpgv2 fails with:
+
+gpgv: Ohhhh jeeee: ... this is a bug (keyid.c:342:keystrlen)
+
+Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
+---
+ g10/keyid.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/g10/keyid.c b/g10/keyid.c
+index cb237ef..bb5c7b9 100644
+--- a/g10/keyid.c
++++ b/g10/keyid.c
+@@ -324,7 +324,11 @@ format_keyid (u32 *keyid, int format, char *buffer, int len)
+ size_t
+ keystrlen(void)
+ {
+-  switch(opt.keyid_format)
++  int format = opt.keyid_format;
++  if (format == KF_DEFAULT)
++    format = KF_0xLONG;
++
++  switch(format)
+     {
+     case KF_SHORT:
+       return 8;
diff --git a/debian/patches/series b/debian/patches/series
index cafe59a..a85b42a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001-rename-gnupg2.patch
 0002-avoid-beta-warning.patch
 0003-Avoid-simple-memory-dumps-via-ptrace.patch
+0004-fix-keystrlen-when-no-keyid-format-option-has-been-g.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list