From cd40a072ba5e4fdde131efcf214b724b3218034b Mon Sep 17 00:00:00 2001 From: David Fifield Date: Fri, 15 May 2020 11:02:13 -0600 Subject: [PATCH] Add another test case for a truncated DNS name compression pointer. --- dns/dns_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/dns/dns_test.go b/dns/dns_test.go index 8629ec6..0808a57 100644 --- a/dns/dns_test.go +++ b/dns/dns_test.go @@ -259,6 +259,7 @@ func TestReadName(t *testing.T) { // EOF while reading label. {0, "\x0aexample", io.ErrUnexpectedEOF}, // EOF before second byte of pointer. + {0, "\xc0", io.ErrUnexpectedEOF}, {0, "\x07example\xc0", io.ErrUnexpectedEOF}, } { r := bytes.NewReader([]byte(test.input))