Explorar o código

Add another test case for a truncated DNS name compression pointer.

David Fifield %!s(int64=6) %!d(string=hai) anos
pai
achega
cd40a072ba
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      dns/dns_test.go

+ 1 - 0
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))