Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connmgr/tor.go: TorLookupIP #1699

Closed
Crypt-iQ opened this issue Mar 17, 2021 · 0 comments · Fixed by paxosglobal/btcd#3
Closed

connmgr/tor.go: TorLookupIP #1699

Crypt-iQ opened this issue Mar 17, 2021 · 0 comments · Fixed by paxosglobal/btcd#3
Labels

Comments

@Crypt-iQ
Copy link
Collaborator

It seems that buf only uses 6+len(host) bytes, but space is reserved for 7+len(host)?

btcd/connmgr/tor.go

Lines 79 to 86 in f86ae60

buf = make([]byte, 7+len(host))
buf[0] = 5 // protocol version
buf[1] = '\xF0' // Tor Resolve
buf[2] = 0 // reserved
buf[3] = 3 // Tor Resolve
buf[4] = byte(len(host))
copy(buf[5:], host)
buf[5+len(host)] = 0 // Port 0

ziollek added a commit to ziollek/btcd that referenced this issue Oct 15, 2021
@jcvernaleo jcvernaleo added the bug label Nov 30, 2021
Crypt-iQ added a commit to Crypt-iQ/btcd that referenced this issue Feb 4, 2022
Roasbeef added a commit that referenced this issue Mar 30, 2022
Revert "reduce redundant memory allocatio - resolves #1699"
roylee17 pushed a commit to lbryio/lbcd that referenced this issue May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants