summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2021-05-23 16:50:19 (GMT)
committeralbert-github <albert.tests@gmail.com>2021-05-23 16:50:19 (GMT)
commit7ba8384ec466c47bac353744c6942f5be1dd9ab8 (patch)
treeaea6da281d3eca4cce743ae4bf2807a7f89c44c0
parente965e5da00bce6076d7009e4a48acee76fc84a7c (diff)
downloadDoxygen-7ba8384ec466c47bac353744c6942f5be1dd9ab8.zip
Doxygen-7ba8384ec466c47bac353744c6942f5be1dd9ab8.tar.gz
Doxygen-7ba8384ec466c47bac353744c6942f5be1dd9ab8.tar.bz2
issue #8564 input buffer overflow, can't enlarge buffer because scanner uses REJECT
When we have a very large "LONGSTRINBLOCK" (e.g. a very large documentation part or an encode executable in e.g. base64 encoding) , there are a lot of lines that have to be read at once, this is not really necessary they can be read sequentially (probably at the cost of some speed)
-rw-r--r--src/pycode.l2
-rw-r--r--src/pyscanner.l2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pycode.l b/src/pycode.l
index 6acf333..f24c8c9 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -183,7 +183,7 @@ LONGSTRINGCHAR [^\\"']
ESCAPESEQ ("\\")(.)
LONGSTRINGITEM ({LONGSTRINGCHAR}|{ESCAPESEQ})
SMALLQUOTE ("\"\""|"\""|"'"|"''")
-LONGSTRINGBLOCK ({LONGSTRINGITEM}+|{SMALLQUOTE})
+LONGSTRINGBLOCK ({LONGSTRINGITEM}|{SMALLQUOTE})
SHORTSTRING ("'"{SHORTSTRINGITEM}*"'"|'"'{SHORTSTRINGITEM}*'"')
SHORTSTRINGITEM ({SHORTSTRINGCHAR}|{ESCAPESEQ})
diff --git a/src/pyscanner.l b/src/pyscanner.l
index bf2a914..a34dc18 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -180,7 +180,7 @@ LONGSTRINGCHAR [^\\"']
ESCAPESEQ ("\\")(.)
LONGSTRINGITEM ({LONGSTRINGCHAR}|{ESCAPESEQ})
SMALLQUOTE ("\"\""|"\""|"'"|"''")
-LONGSTRINGBLOCK ({LONGSTRINGITEM}+|{SMALLQUOTE})
+LONGSTRINGBLOCK ({LONGSTRINGITEM}|{SMALLQUOTE})
SHORTSTRING ("'"{SHORTSTRINGITEM}*"'"|'"'{SHORTSTRINGITEM}*'"')
SHORTSTRINGITEM ({SHORTSTRINGCHAR}|{ESCAPESEQ})