From 135a9f4b5aead507c030fb7e3e8ad13aaa91f403 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 7 Nov 2014 11:31:12 +0900 Subject: [PATCH] epg: Adjust to GnuPG 2.1 key listing change * epg.el (epg--list-keys-1): Ignore fields after the 15th field (bug#18979). Reported by Hideki Saito. --- lisp/ChangeLog | 5 +++++ lisp/epg.el | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1e447d446db..d2eda896295 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-11-07 Daiki Ueno + + * epg.el (epg--list-keys-1): Ignore fields after the 15th field + (bug#18979). Reported by Hideki Saito. + 2014-11-06 Daiki Ueno * emacs-lisp/package.el (package--display-verify-error): New function. diff --git a/lisp/epg.el b/lisp/epg.el index 0c74531d7b8..e4d8c1e1a02 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -1278,8 +1278,9 @@ callback data (if any)." string (match-string 0) index 0 field 0) - (while (eq index - (string-match "\\([^:]+\\)?:" string index)) + (while (and (< field (length (car keys))) + (eq index + (string-match "\\([^:]+\\)?:" string index))) (setq index (match-end 0)) (aset (car keys) field (match-string 1 string)) (setq field (1+ field)))) -- 2.39.5