dnsforward/ipset: add segfault defense for missing DNS question section

This commit is contained in:
David Sheets
2020-10-07 09:53:30 +01:00
parent a93c6b6775
commit d39c1b0be6
2 changed files with 8 additions and 1 deletions

View File

@@ -105,6 +105,13 @@ func TestIpsetParsing(t *testing.T) {
assert.False(t, ok)
}
func TestIpsetNoQuestion(t *testing.T) {
setup()
doProcess(t)
assert.Equal(t, 0, len(b))
}
func TestIpsetNoAnswer(t *testing.T) {
setup()