Skip to content

Commit fd8de67

Browse files
author
Dmitry Voronov
committed
sqlparser: Limit nesting of parenthesized exprs
Otherwise it's yacc generated code is vulnerable to DOS. vitessio/vitess#767
1 parent fdaaa77 commit fd8de67

File tree

4 files changed

+957
-606
lines changed

4 files changed

+957
-606
lines changed

sqlparser/parse_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,8 +683,8 @@ func TestErrors(t *testing.T) {
683683
input: "select 'aa",
684684
output: "syntax error at position 12 near 'aa'",
685685
}, {
686-
input: "select * from t where :1 = 2",
687-
output: "syntax error at position 24 near ':'",
686+
input: "select * from t where = 2",
687+
output: "syntax error at position 24",
688688
}, {
689689
input: "select * from t where :. = 2",
690690
output: "syntax error at position 24 near ':'",

0 commit comments

Comments
 (0)