]> code.delx.au - gnu-emacs/blobdiff - lisp/epg.el
epg: Adjust to GnuPG 2.1 key listing change
[gnu-emacs] / lisp / epg.el
index 0c74531d7b8ef910298dcc23ec17a4978261b455..e4d8c1e1a024d134733c86d8c3ca252de4fca21a 100644 (file)
@@ -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))))