--- Begin Message ---
Subject: |
[PATCH] Fix infinite parsing loop |
Date: |
Mon, 4 Apr 2016 10:18:50 +0200 |
Searching for `[A-Za-z]' leads to an infinite loop with GnuTLS 3.4.10 as
it appends a peer closed message to the temporary buffer. Look for the
`--' delimiter instead and if it isn't found, assume there are no more
tickets to be parsed.
---
rt-liberation.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rt-liberation.el b/rt-liberation.el
index 90b7929..4376f02 100644
--- a/rt-liberation.el
+++ b/rt-liberation.el
@@ -396,7 +396,7 @@ AFTER date after predicate."
"Parser function for ticket list."
(let (ticketbase-list ticketbase (continue t))
(while (save-excursion
- (re-search-forward "[A-Za-z]" (point-max) t)) ; really?
+ (re-search-forward "^--" (point-max) t))
(while (and continue
(re-search-forward
"^\\(\\([\.{} #[:alpha:]]+\\): \\(.*\\)\\)$\\|^--$"
--
2.3.3
--- End Message ---