Update quic-go

This commit is contained in:
Frank Denis 2025-01-26 23:29:11 +01:00
parent 0ba23128cc
commit 4c659acad9
283 changed files with 6124 additions and 14020 deletions

View file

@ -39,12 +39,11 @@ import (
)
type buffer struct {
field int // field tag
typ int // proto wire type code for field
u64 uint64
data []byte
tmp [16]byte
tmpLines []Line // temporary storage used while decoding "repeated Line".
field int // field tag
typ int // proto wire type code for field
u64 uint64
data []byte
tmp [16]byte
}
type decoder func(*buffer, message) error
@ -287,6 +286,7 @@ func decodeInt64s(b *buffer, x *[]int64) error {
if b.typ == 2 {
// Packed encoding
data := b.data
tmp := make([]int64, 0, len(data)) // Maximally sized
for len(data) > 0 {
var u uint64
var err error
@ -294,8 +294,9 @@ func decodeInt64s(b *buffer, x *[]int64) error {
if u, data, err = decodeVarint(data); err != nil {
return err
}
*x = append(*x, int64(u))
tmp = append(tmp, int64(u))
}
*x = append(*x, tmp...)
return nil
}
var i int64
@ -318,6 +319,7 @@ func decodeUint64s(b *buffer, x *[]uint64) error {
if b.typ == 2 {
data := b.data
// Packed encoding
tmp := make([]uint64, 0, len(data)) // Maximally sized
for len(data) > 0 {
var u uint64
var err error
@ -325,8 +327,9 @@ func decodeUint64s(b *buffer, x *[]uint64) error {
if u, data, err = decodeVarint(data); err != nil {
return err
}
*x = append(*x, u)
tmp = append(tmp, u)
}
*x = append(*x, tmp...)
return nil
}
var u uint64