Skip to content

Commit

Permalink
Allow frame offset starting at non-zero
Browse files Browse the repository at this point in the history
  • Loading branch information
mingyech committed Oct 2, 2024
1 parent 560e27c commit 20e8105
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quic_frame.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func ReassembleCRYPTOFrames(frames []QUICFrame) ([]byte, error) {
// Reassemble CRYPTO frames
var reassembled []byte = make([]byte, 0)
for _, frame := range cryptoFrames {
if uint64(len(reassembled)) == frame.(*CRYPTO).Offset {
if cryptoFrames[0].(*CRYPTO).Offset+uint64(len(reassembled)) == frame.(*CRYPTO).Offset {
reassembled = append(reassembled, frame.(*CRYPTO).data...)
} else {
return nil, fmt.Errorf("failed to reassemble CRYPTO frames")
Expand Down

0 comments on commit 20e8105

Please sign in to comment.