diff options
author | Dieter Verfaillie <dieterv@optionexplicit.be> | 2013-08-29 07:45:04 +0200 |
---|---|---|
committer | Dieter Verfaillie <dieterv@optionexplicit.be> | 2013-10-08 20:57:25 +0200 |
commit | aa4a40288533b3d06d69ebe8fe1a12bfec2a8cda (patch) | |
tree | 1c33f5f4d8672130ed2a70438b6b86657c81296e /giscanner/annotationparser.py | |
parent | ce352de62e1ccc9ecaa2649d85569acc272ee0ed (diff) | |
download | gobject-introspection-aa4a40288533b3d06d69ebe8fe1a12bfec2a8cda.tar.gz |
giscanner: fix c0e748e1cdf8cf0803266f94c3c5ad154df504a8
When encountering /**/ in the source, parse_gtk_doc_comment()
would be executed (due to the /** part starting a GTK-Doc
comment block) and would happily consume the / and everything
up until the next comment block was closed or EOF, thus
consuming a whole block of C code...
Encoutered in the wild here:
https://git.gnome.org/browse/clutter-gst/tree/clutter-gst/clutter-gst-player.c?id=03f0d8f48bd7f60e582e6185cb73a07038e8d55d#n1926
Diffstat (limited to 'giscanner/annotationparser.py')
-rw-r--r-- | giscanner/annotationparser.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py index 244df114..a00bac1d 100644 --- a/giscanner/annotationparser.py +++ b/giscanner/annotationparser.py @@ -294,8 +294,9 @@ COMMENT_BLOCK_START_RE = re.compile( ^ # start (?P<code>.*?) # whitespace, code, ... \s* # 0 or more whitespace characters - (?P<token>/\*{2}(?!\*)) # 1 forward slash character followed + (?P<token>/\*{2}(?![\*/])) # 1 forward slash character followed # by exactly 2 asterisk characters + # and not followed by a slash character \s* # 0 or more whitespace characters (?P<comment>.*?) # GTK-Doc comment text \s* # 0 or more whitespace characters |