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

Bug29960 cant fail #908

Merged
9 commits merged into from Apr 12, 2019
Merged

Bug29960 cant fail #908

9 commits merged into from Apr 12, 2019

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Apr 5, 2019

No description provided.

(These functions look pretty unified to me.)

Part of 29660.
... and ed25519_public_to_base64(). Also remove all checks for the return
values, which were redundant anyway, because the functions never failed.

Part of 29960.
…64()

And fix the documentation on the function: it does produce trailing
"="s as padding.

Also remove all checks for the return value, which were redundant anyway,
because the function never failed.

Part of 29660.
…64()

Also remove all checks for the return value, which were redundant anyway,
because the function never failed.

Part of 29660.
base64_decode() does not require padding.

Part of 29660.
@coveralls
Copy link

coveralls commented Apr 5, 2019

Pull Request Test Coverage Report for Build 4710

  • 29 of 31 (93.55%) changed or added relevant lines in 6 files are covered.
  • 872 unchanged lines in 11 files lost coverage.
  • Overall coverage increased (+0.02%) to 62.28%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/feature/dirauth/dirvote.c 0 1 0.0%
src/feature/hs/hs_client.c 2 3 66.67%
Files with Coverage Reduction New Missed Lines %
src/ext/getdelim.c 1 0.0%
src/feature/hs/hs_client.c 1 50.0%
src/core/or/relay.c 1 49.33%
src/lib/malloc/map_anon.c 1 96.67%
src/lib/crypt_ops/crypto_rand_fast.c 2 97.56%
src/lib/buf/buffers.c 6 91.03%
src/lib/crypt_ops/crypto_init.c 7 83.05%
src/core/or/circuitpadding.c 20 92.47%
src/feature/nodelist/networkstatus.c 137 53.29%
src/core/mainloop/connection.c 233 25.58%
Totals Coverage Status
Change from base Build 4574: 0.02%
Covered Lines: 46201
Relevant Lines: 74183

💛 - Coveralls

if (strlen(input) != ED25519_SIG_BASE64_LEN)
return -1;
char buf[ED25519_SIG_BASE64_LEN+3];
char buf[ED25519_SIG_BASE64_LEN+1];
memcpy(buf, input, ED25519_SIG_BASE64_LEN);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need to use 'buf' here at all any more; we could just use "input" directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ghost ghost merged commit ebbc2c3 into torproject:master Apr 12, 2019
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants