diff options
author | Miles Bader <miles@gnu.org> | 2007-12-09 22:14:32 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-12-09 22:14:32 +0000 |
commit | 21ee0911f749a8dfaf97d13075bfec4862c06161 (patch) | |
tree | 3740d08b42ef85f5a1ea28f6f4e7b0f9853b5d78 /lisp/net | |
parent | 0e250bf8782b236076a03f470eab9ce3a26bccb5 (diff) | |
download | emacs-21ee0911f749a8dfaf97d13075bfec4862c06161.tar.gz |
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-950
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/imap.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 85af73972fe..40e41d79de7 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el @@ -1735,6 +1735,18 @@ is non-nil return these properties." (concat "UID STORE " articles " +FLAGS" (if silent ".SILENT") " (" flags ")")))))) +;; Cf. http://thread.gmane.org/gmane.emacs.gnus.general/65317/focus=65343 +;; Signal an error if we'd get an integer overflow. +;; +;; FIXME: Identify relevant calls to `string-to-number' and replace them with +;; `imap-string-to-integer'. +(defun imap-string-to-integer (string &optional base) + (let ((number (string-to-number string base))) + (if (> number most-positive-fixnum) + (error + (format "String %s cannot be converted to a lisp integer" number)) + number))) + (defun imap-message-copyuid-1 (mailbox) (if (imap-capability 'UIDPLUS) (list (nth 0 (imap-mailbox-get-1 'copyuid mailbox)) |