Skip to content

Commit

Permalink
Set reserved to zero after Read()
Browse files Browse the repository at this point in the history
Thank @IRN-Kawakaze for testing
  • Loading branch information
RPRX authored Mar 3, 2023
1 parent 25ea69f commit 4c8ee0a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions proxy/wireguard/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ func (bind *netBindClient) connectTo(endpoint *netEndpoint) error {
return
}
i, err := c.Read(v.buff)

if i > 3 {
v.buff[1] = 0
v.buff[2] = 0
v.buff[3] = 0
}

v.bytes = i
v.endpoint = endpoint
v.err = err
Expand Down

0 comments on commit 4c8ee0a

Please sign in to comment.