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

bt.torrent.messaging.ExchangedMetadata.getSha1Digest should not allocate larger buffer than necessary #134

Closed
atomashpolskiy opened this issue Dec 16, 2019 · 0 comments · Fixed by #212

Comments

@atomashpolskiy
Copy link
Owner

Instead of always allocating a fixed size buffer (1,000,000 bytes currently), it should leverage the upfront knowledge of total size of the metadata and allocate Math.min(DEFAULT_BUFFER_LEN, metadata.length()).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant