mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 12:47:36 +03:00
avoid recursion when skipping unknown HTTP/3 frames (#3354)
This commit is contained in:
parent
2661c2807d
commit
4725ddebf3
1 changed files with 31 additions and 30 deletions
|
@ -14,6 +14,7 @@ type frame interface{}
|
|||
|
||||
func parseNextFrame(r io.Reader) (frame, error) {
|
||||
qr := quicvarint.NewReader(r)
|
||||
for {
|
||||
t, err := quicvarint.Read(qr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -45,7 +46,7 @@ func parseNextFrame(r io.Reader) (frame, error) {
|
|||
if _, err := io.CopyN(ioutil.Discard, qr, int64(l)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return parseNextFrame(qr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue