forked from quic-go/quic-go
wire: implement parsing and writing of the ACK_FREQUENCY frame (#5264)
* implement parsing and writing of the ACK_FREQUENCY frame * prevent overflows of Request Max Ack Delay * fix fuzzer
This commit is contained in:
@@ -35,7 +35,7 @@ func Fuzz(data []byte) int {
|
||||
encLevel := toEncLevel(data[0])
|
||||
data = data[PrefixLen:]
|
||||
|
||||
parser := wire.NewFrameParser(true, true)
|
||||
parser := wire.NewFrameParser(true, true, true)
|
||||
parser.SetAckDelayExponent(protocol.DefaultAckDelayExponent)
|
||||
|
||||
var numFrames int
|
||||
@@ -153,5 +153,9 @@ func validateFrame(frame wire.Frame) {
|
||||
if f.FinalSize < f.ReliableSize {
|
||||
panic("RESET_STREAM frame with a FinalSize smaller than the ReliableSize")
|
||||
}
|
||||
case *wire.AckFrequencyFrame:
|
||||
if f.RequestMaxAckDelay < 0 {
|
||||
panic("ACK_FREQUENCY frame with a negative RequestMaxAckDelay")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user