Store HIGHESTMODSEQ as a string, since it may be too large for 32-bit Emacsen.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 15 Mar 2011 16:58:49 +0000 (17:58 +0100)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 15 Mar 2011 16:58:49 +0000 (17:58 +0100)
lisp/ChangeLog
lisp/nnimap.el

index dd1ec97..c83ac33 100644 (file)
@@ -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  <nelson.ferreira@ieee.org>  (tiny change)
 
index 1a2bb6f..8184d68 100644 (file)
@@ -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.