Skip to content
This repository has been archived by the owner on Apr 3, 2021. It is now read-only.

Commit

Permalink
Fix buffer bounding
Browse files Browse the repository at this point in the history
fix #116
  • Loading branch information
ghost committed May 24, 2020
1 parent 7492950 commit d42eac8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxy/socks/udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ func (h *udpHandler) fetchUDPInput(conn core.UDPConn, input net.PacketConn) {
if err != nil {
return
}
if len(buf) < 3 {
if n < 3 {
return
}
addr := SplitAddr(buf[3:])
addr := SplitAddr(buf[3:n])
if addr == nil {
return
}
Expand Down

0 comments on commit d42eac8

Please sign in to comment.