forked from quic-go/quic-go
remove the LongHeader field from the wire.Header
This commit is contained in:
@@ -30,8 +30,14 @@ func Fuzz(data []byte) int {
|
||||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
if !wire.IsLongHeaderPacket(data[0]) {
|
||||
wire.ParseShortHeader(data, connIDLen)
|
||||
return 1
|
||||
}
|
||||
|
||||
is0RTTPacket := wire.Is0RTTPacket(data)
|
||||
hdr, _, _, err := wire.ParsePacket(data, connIDLen)
|
||||
hdr, _, _, err := wire.ParsePacket(data)
|
||||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
@@ -42,11 +48,6 @@ 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 {
|
||||
@@ -60,7 +61,7 @@ func Fuzz(data []byte) int {
|
||||
}
|
||||
// We always use a 2-byte encoding for the Length field in Long Header packets.
|
||||
// Serializing the header will fail when using a higher value.
|
||||
if hdr.IsLongHeader && hdr.Length > 16383 {
|
||||
if hdr.Length > 16383 {
|
||||
return 1
|
||||
}
|
||||
b := &bytes.Buffer{}
|
||||
|
||||
Reference in New Issue
Block a user