From: Daiki Ueno Date: Fri, 7 Nov 2014 04:16:26 +0000 (+0900) Subject: epg: Adjust to GnuPG 2.1 key listing change X-Git-Tag: emacs-24.4.90~261 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dbae12c5dfd236bc5f5916296659407e50fce7d6;p=emacs.git 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. Backported from trunk. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b83459503b4..c134e589c30 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-10-18 Alan Mackenzie Check that a "macro" found near point-min isn't a ## operator. diff --git a/lisp/epg.el b/lisp/epg.el index 77181a1a342..4d9bbd2cd6b 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -1910,8 +1910,9 @@ This function is for internal use only." 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))))