summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2012-02-03 20:37:26 +0000
committerDamien Doligez <damien.doligez-inria.fr>2012-02-03 20:37:26 +0000
commit816ac58196282b22c6ac1b66999d85de59fae92b (patch)
tree232bfe5a43e118228fd278661c79f4ff210eadd0 /emacs
parent1afe70ff8a1b235f23a452d3a8e1be193a34430c (diff)
downloadocaml-816ac58196282b22c6ac1b66999d85de59fae92b.tar.gz
PR#5176: caml-types.el: large types trigger stack overflow in regexp matcher
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12119 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'emacs')
-rw-r--r--emacs/caml-types.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/emacs/caml-types.el b/emacs/caml-types.el
index 70d38bccea..bc4c82ba4a 100644
--- a/emacs/caml-types.el
+++ b/emacs/caml-types.el
@@ -411,8 +411,7 @@ See `caml-types-location-re' for annotation file format.
(unless (caml-types-not-in-file l-file r-file target-file)
(setq annotation ())
(while (next-annotation)
- (cond ((looking-at
- "^\\([a-z]+\\)(\n \\(\\([^\n)]\\|.)\\|\n[^)]\\)*\\)\n)")
+ (cond ((looking-at "^\\([a-z]+\\)(\n \\(\\(.*\n \\)*.*\\)\n)")
(let ((kind (caml-types-hcons (match-string 1) table))
(info (caml-types-hcons (match-string 2) table)))
(setq annotation (cons (cons kind info) annotation))))))