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
master
Damien Doligez 2012-02-03 20:37:26 +00:00
parent 1afe70ff8a
commit 816ac58196
1 changed files with 1 additions and 2 deletions

View File

@ -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))))))