forked from quic-go/quic-go
stop using the ExtendedHeader for parsing short header packets in tests
This commit is contained in:
@@ -42,6 +42,11 @@ func Fuzz(data []byte) int {
|
||||
panic("inconsistent 0-RTT packet detection")
|
||||
}
|
||||
|
||||
if !wire.IsLongHeaderPacket(data[0]) {
|
||||
wire.ParseShortHeader(data, connIDLen)
|
||||
return 1
|
||||
}
|
||||
|
||||
var extHdr *wire.ExtendedHeader
|
||||
// Parse the extended header, if this is not a Retry packet.
|
||||
if hdr.Type == protocol.PacketTypeRetry {
|
||||
@@ -58,9 +63,6 @@ func Fuzz(data []byte) int {
|
||||
if hdr.IsLongHeader && hdr.Length > 16383 {
|
||||
return 1
|
||||
}
|
||||
if !hdr.IsLongHeader {
|
||||
return 1
|
||||
}
|
||||
b := &bytes.Buffer{}
|
||||
if err := extHdr.Write(b, version); err != nil {
|
||||
// We are able to parse packets with connection IDs longer than 20 bytes,
|
||||
|
||||
Reference in New Issue
Block a user