1
0
mirror of https://github.com/MetaCubeX/mihomo.git synced 2026-10-10 04:03:11 +08:00

fix: quic sniffer out-of-bounds read causes process crash via single UDP packet

This commit is contained in:
Guanni Qu
2026-06-06 00:37:14 +08:00
committed by wwqgtxx
parent ab56858d00
commit 11848509fb
+4
View File
@@ -236,6 +236,10 @@ func (q *quicPacketSender) readQuicData(b []byte) error {
cache := buf.NewPacket()
defer cache.Release()
if hdrLen+4+16 > len(b) {
return errNotQuic
}
mask := cache.Extend(block.BlockSize())
block.Encrypt(mask, b[hdrLen+4:hdrLen+4+16])
firstByte := b[0]