From af55f6a791be2583b4da0228aaeecc06f722878e Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Tue, 15 Mar 2011 17:58:49 +0100 Subject: [PATCH] Store HIGHESTMODSEQ as a string, since it may be too large for 32-bit Emacsen. --- lisp/ChangeLog | 2 ++ lisp/nnimap.el | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dd1ec9744..c83ac3387 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,8 @@ * nnimap.el (nnimap-parse-flags): Remove all MODSEQ entries before parsing to avoid integer overflows. (nnimap-parse-flags): Simplify the last change. + (nnimap-parse-flags): Store HIGHESTMODSEQ as a string, since it may be + too large for 32-bit Emacsen. 2011-03-15 Nelson Ferreira (tiny change) diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 1a2bb6f26..8184d68c3 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -1452,8 +1452,8 @@ textual parts.") ;; Change \Delete etc to %Delete, so that the reader can read it. (subst-char-in-region (point-min) (point-max) ?\\ ?% t) - ;; Remove any MODSEQ entries in the buffer, because they may - ;; contain numbers that are too large for 32-bit Emacsen. + ;; Remove any MODSEQ entries in the buffer, because they may contain + ;; numbers that are too large for 32-bit Emacsen. (while (re-search-forward " MODSEQ ([0-9]+)" nil t) (replace-match "" t t)) (goto-char (point-min)) @@ -1496,9 +1496,9 @@ textual parts.") (match-string 1))) (goto-char start) (setq highestmodseq - (and (search-forward "HIGHESTMODSEQ " + (and (re-search-forward "HIGHESTMODSEQ \\([0-9]+\\)" (or end (point-min)) t) - (read (current-buffer)))) + (match-string 1))) (goto-char end) (forward-line -1)) ;; The UID FETCH FLAGS was successful. -- 2.25.1