diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2012-02-03 20:37:26 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2012-02-03 20:37:26 +0000 |
commit | 816ac58196282b22c6ac1b66999d85de59fae92b (patch) | |
tree | 232bfe5a43e118228fd278661c79f4ff210eadd0 /emacs | |
parent | 1afe70ff8a1b235f23a452d3a8e1be193a34430c (diff) |
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.el | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/emacs/caml-types.el b/emacs/caml-types.el index 70d38bcce..bc4c82ba4 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)))))) |