Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions common/protocol/quic/sniff.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ func SniffQUIC(b []byte) (*SniffHeader, error) {
}

extHdrLen := hdrLen + int(packetNumberLength)
// very stange packet length, maybe a fake QUIC header
Comment thread
Fangliding marked this conversation as resolved.
Outdated
if int(packetNumberLength) > int(packetLen) {
return nil, errNotQuic
}
copy(b[extHdrLen:hdrLen+4], origPNBytes[packetNumberLength:])
data := b[extHdrLen : int(packetLen)+hdrLen]

Expand Down