parsing: error on unbalanced braces (#489)
When done parsing, check if we have balanced braces, if not error out. Fixes #488
This commit is contained in:
parent
f282f80e24
commit
babbdab23a
|
@ -1527,3 +1527,14 @@ func TestParseAVC(t *testing.T) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestUnbalancedParens(t *testing.T) {
|
||||
sig := `example.com. 3600 IN RRSIG MX 15 2 3600 (
|
||||
1440021600 1438207200 3613 example.com. (
|
||||
oL9krJun7xfBOIWcGHi7mag5/hdZrKWw15jPGrHpjQeRAvTdszaPD+QLs3f
|
||||
x8A4M3e23mRZ9VrbpMngwcrqNAg== )`
|
||||
_, err := NewRR(sig)
|
||||
if err == nil {
|
||||
t.Fatalf("Failed to detect extra opening brace")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue