Merge pull request #2564 from lucas-clemente/fix-int-overflow-in-tp-parsing

fix int overflow when parsing the transport parameters
This commit is contained in:
Marten Seemann
2020-05-25 15:18:14 +07:00
committed by GitHub

View File

@@ -129,7 +129,7 @@ func (p *TransportParameters) unmarshal(data []byte, sentBy protocol.Perspective
return err
}
default:
if r.Len() < int(paramLen) {
if uint64(r.Len()) < paramLen {
return fmt.Errorf("remaining length (%d) smaller than parameter length (%d)", r.Len(), paramLen)
}
switch paramID {