diff options
author | albert-github <albert.tests@gmail.com> | 2020-05-02 18:24:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-02 18:24:38 (GMT) |
commit | 81cda478974e4198b10054a5ef49bc250c1a3cf7 (patch) | |
tree | 96a553f293006cc4bf11b9c29aca70746475fa34 /src/scanner.l | |
parent | 03115ed64d916b94c52275fe0b329bd817d4ce94 (diff) | |
download | Doxygen-81cda478974e4198b10054a5ef49bc250c1a3cf7.zip Doxygen-81cda478974e4198b10054a5ef49bc250c1a3cf7.tar.gz Doxygen-81cda478974e4198b10054a5ef49bc250c1a3cf7.tar.bz2 |
Input buffer overflow in php input code (#7745)
When having a very long initialization line in php code we get the message:
```
input buffer overflow, can't enlarge buffer because scanner uses REJECT
```
In this case the, easy, solution is to split, in the lexer, the input based on the commas.
Diffstat (limited to 'src/scanner.l')
-rw-r--r-- | src/scanner.l | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/scanner.l b/src/scanner.l index 8ceb4ad..e9cad5f 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -2898,7 +2898,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) *yyextra->pCopyRoundString+=yytext; } } -<CopyRound>[^"'()\n]+ { +<CopyRound>[^"'()\n,]+ { *yyextra->pCopyRoundString+=yytext; } <CopyRound>. { @@ -2948,7 +2948,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) *yyextra->pCopyRoundGString+=yytext; } } -<GCopyRound>[^"'()\n/]+ { +<GCopyRound>[^"'()\n\/,]+ { *yyextra->pCopyRoundGString+=yytext; } <GCopyRound>. { @@ -2998,7 +2998,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) *yyextra->pCopySquareGString+=yytext; } } -<GCopySquare>[^"\[\]\n/]+ { +<GCopySquare>[^"\[\]\n\/,]+ { *yyextra->pCopySquareGString+=yytext; } <GCopySquare>. { @@ -3039,7 +3039,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) *yyextra->pCopyCurlyString+=yytext; } } -<CopyCurly>[^"'{}\/\n]+ { +<CopyCurly>[^"'{}\/\n,]+ { *yyextra->pCopyCurlyString+=yytext; } <CopyCurly>"/" { *yyextra->pCopyCurlyString+=yytext; } |