Skip to content

Commit

Permalink
Bugfix: properly index the buf
Browse files Browse the repository at this point in the history
  • Loading branch information
namaho committed Jun 19, 2017
1 parent 9baef5e commit fd21b02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion socks/socks.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func ReadAddr(r io.Reader) (Addr, error) {
if err != nil {
return nil, err
}
_, err = io.ReadFull(r, b[2:2+b[1]+2])
_, err = io.ReadFull(r, b[2:2+int(b[1])+2])
return b[:1+1+b[1]+2], err
case AtypIPv4:
_, err = io.ReadFull(r, b[1:1+net.IPv4len+2])
Expand Down

0 comments on commit fd21b02

Please sign in to comment.