[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/backports-25.2 171ec16 44/46: Avoid error in icale
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] scratch/backports-25.2 171ec16 44/46: Avoid error in icalendar--read-element |
Date: |
Sun, 2 Oct 2016 14:04:50 +0000 (UTC) |
branch: scratch/backports-25.2
commit 171ec164bc684c2bc48f74a7aa47c7a70d875922
Author: Peder O. Klingenberg <address@hidden>
Commit: Noam Postavsky <address@hidden>
Avoid error in icalendar--read-element
* lisp/calendar/icalendar.el (icalendar--read-element): Avoid a regex
stack overflow by not using regex to extract values from calendar
events. (Bug#24315)
(cherry picked from commit 55dde6c1a21a792d3d75c19e612c74dd054aaf1e)
---
lisp/calendar/icalendar.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
index 386c554..c88f4ab 100644
--- a/lisp/calendar/icalendar.el
+++ b/lisp/calendar/icalendar.el
@@ -361,7 +361,8 @@ Pass arguments REGEXP REP STRING FIXEDCASE LITERAL to
INVALUE gives the current iCalendar element we are reading.
INPARAMS gives the current parameters.....
This function calls itself recursively for each nested calendar element
-it finds."
+it finds. The current buffer should be an unfolded buffer as returned
+from `icalendar--get-unfolded-buffer'."
(let (element children line name params param param-name param-value
value
(continue t))
@@ -391,8 +392,9 @@ it finds."
(unless (looking-at ":")
(error "Oops"))
(forward-char 1)
- (re-search-forward "\\(.*\\)\\(\r?\n[ \t].*\\)*" nil t)
- (setq value (icalendar--rris "\r?\n[ \t]" "" (match-string 0)))
+ (let ((start (point)))
+ (end-of-line)
+ (setq value (buffer-substring start (point))))
(setq line (list name params value))
(cond ((eq name 'BEGIN)
(setq children
- [Emacs-diffs] scratch/backports-25.2 80cf0b6 21/46: Restore the fix to bug#18527 from commit d6868025, (continued)
- [Emacs-diffs] scratch/backports-25.2 80cf0b6 21/46: Restore the fix to bug#18527 from commit d6868025, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 51656da 28/46: Fix number-at-point in lisp buffers, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 0876366 43/46: Fix back-white <-> black-white typo, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 f3a19cf 31/46: Make a menu less ambiguous, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 12d1955 41/46: * lisp/files.el (version-control): Drop :group vc (Bug #14687), Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 cf54324 42/46: Improve error when installing non-package dirs, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 9e9f7c8 45/46: Don't --load directories, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 eb5dd2c 46/46: Don't require isearch-update before isearch-done, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 aad7ede 07/46: Ensure progress when fetching from the queue, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 87a7490 35/46: Clarify `read-face-name' doc and tweak the code, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 171ec16 44/46: Avoid error in icalendar--read-element,
Noam Postavsky <=
- [Emacs-diffs] scratch/backports-25.2 a33eb50 03/46: Let url use default file modes when copying files, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 30376cc 22/46: Allow _ characters in SQL prompts, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 145e369 05/46: Make the nsm query say what it did after the user interaction, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 e1e768e 01/46: Default web pages to right-to-left, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 b16e6c3 09/46: Require that the buffer that we're trying to patch exist, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 e2e25ae 20/46: Make <div> in <li> not insert extra newlines, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 77c3f7f 24/46: Make `q' etc work in image mode again, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 d7de0c4 25/46: smtpmail would say it's done before it is, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 f65b1a3 27/46: Don't consider colons to be paragraphs starting chars in strings, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 d95942f 29/46: Clean up custom-buffer-create code slightly, Noam Postavsky, 2016/10/02