diff options
| author | Leonard Randall | 2014-11-27 09:38:21 +0100 |
|---|---|---|
| committer | Tassilo Horn | 2014-11-27 09:38:21 +0100 |
| commit | b66511f7680a195c5f56f2275f21e1d571706fba (patch) | |
| tree | b3c7b87dfa4d667c22dae97faa53a7f3a77f0dfb | |
| parent | 7bf7edf53f65752f408d0f5e9d0af56bfcf683f5 (diff) | |
| download | emacs-b66511f7680a195c5f56f2275f21e1d571706fba.tar.gz emacs-b66511f7680a195c5f56f2275f21e1d571706fba.zip | |
Backport regexp stack overflow fix from emacs-24.
* textmodes/reftex-parse.el (reftex-using-biblatex-p): Make search
for comment lines non-greedy and stopping at newlines to fix stack
overflows with large files. [Backport]
Signed-off-by: Tassilo Horn <tsdh@gnu.org>
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/textmodes/reftex-parse.el | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index af75f8db368..d88ecfeb8a8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-11-27 Leonard Randall <leonard.a.randall@gmail.com> | ||
| 2 | |||
| 3 | * textmodes/reftex-parse.el (reftex-using-biblatex-p): Make search | ||
| 4 | for comment lines non-greedy and stopping at newlines to fix stack | ||
| 5 | overflows with large files. [Backport] | ||
| 6 | |||
| 1 | 2014-11-27 Fabián Ezequiel Gallina <fgallina@gnu.org> | 7 | 2014-11-27 Fabián Ezequiel Gallina <fgallina@gnu.org> |
| 2 | 8 | ||
| 3 | * progmodes/python.el (python-shell-completion-setup-code): Use | 9 | * progmodes/python.el (python-shell-completion-setup-code): Use |
diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index 71bec89a51d..a5572118fff 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el | |||
| @@ -357,7 +357,7 @@ of master file." | |||
| 357 | (member "biblatex" TeX-active-styles) | 357 | (member "biblatex" TeX-active-styles) |
| 358 | ;; poor-man's check... | 358 | ;; poor-man's check... |
| 359 | (save-excursion | 359 | (save-excursion |
| 360 | (re-search-forward "^[^%]*\\\\usepackage.*{biblatex}" nil t)))) | 360 | (re-search-forward "^[^%\n]*?\\\\usepackage.*{biblatex}" nil t)))) |
| 361 | 361 | ||
| 362 | (defun reftex-locate-bibliography-files (master-dir &optional files) | 362 | (defun reftex-locate-bibliography-files (master-dir &optional files) |
| 363 | "Scan buffer for bibliography macros and return file list." | 363 | "Scan buffer for bibliography macros and return file list." |