Commit 4a9f6894 authored by David Goulet's avatar David Goulet Committed by Nick Mathewson

control: Wrong check on base16_decode return value

The GETINFO extra-info/digest/<digest> broke in commit 568dc27a that
refactored the base16_decode() API to return the decoded length.
Unfortunately, that if() condition should have checked for the correct length
instead of an error which broke the command in tor-0.2.9.1-alpha.

Fixes #22034
Signed-off-by: David Goulet's avatarDavid Goulet <[email protected]>
parent 7d7770f7
o Minor bugfixes (control port, regression):
- The GETINFO extra-info/digest/<digest> command was broken because of a
wrong base16 decode return value check. In was introduced in a refactor
of that API. Fixex bug #22034; bugfix on tor-0.2.9.1-alpha.
......@@ -2055,7 +2055,7 @@ getinfo_helper_dir(control_connection_t *control_conn,
char d[DIGEST_LEN];
signed_descriptor_t *sd = NULL;
if (base16_decode(d, sizeof(d), question, strlen(question))
!= sizeof(d)) {
== sizeof(d)) {
/* XXXX this test should move into extrainfo_get_by_descriptor_digest,
* but I don't want to risk affecting other parts of the code,
* especially since the rules for using our own extrainfo (including
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment