Add test for forward compression pointer (#1123)

Automatically submitted.
This commit is contained in:
Richard Gibson 2020-05-27 04:05:25 -04:00 committed by GitHub
parent 0ffcea3295
commit 203ad2480b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -202,6 +202,7 @@ func TestUnpackDomainName(t *testing.T) {
"\x03foo" + "\x03bar" + "\x07example" + "\xC0\x04",
"",
ErrLongDomain.Error()},
{"forward compression pointer", "\x02\xC0\xFF\xC0\x01", "", ErrBuf.Error()},
{"reserved compression pointer 0b10", "\x07example\x80", "", "dns: bad rdata"},
{"reserved compression pointer 0b01", "\x07example\x40", "", "dns: bad rdata"},
}