Merge pull request #2711 from lucas-clemente/validate-quic-config

disallow values above 2^60 for Config.MaxIncoming{Uni}Streams
This commit is contained in:
Marten Seemann 2020-08-18 06:58:55 +07:00 committed by GitHub
commit c978b6050c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 54 additions and 11 deletions

View file

@ -171,6 +171,9 @@ func listen(conn net.PacketConn, tlsConf *tls.Config, config *Config, acceptEarl
if tlsConf == nil {
return nil, errors.New("quic: tls.Config not set")
}
if err := validateConfig(config); err != nil {
return nil, err
}
config = populateServerConfig(config)
for _, v := range config.Versions {
if !protocol.IsValidVersion(v) {