mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
It is not a bug to attempt to base32_decode a non-base32 string
(Rationale: it isn't a bug to try this for a base16 or base64 string. It's just a bad input that we're detecting.)
This commit is contained in:
parent
d4f05dcd0e
commit
251b348d7b
@ -88,7 +88,7 @@ base32_decode(char *dest, size_t destlen, const char *src, size_t srclen)
|
||||
else if (src[j] > 0x31 && src[j] < 0x38) tmp[j] = src[j] - 0x18;
|
||||
else if (src[j] > 0x40 && src[j] < 0x5B) tmp[j] = src[j] - 0x41;
|
||||
else {
|
||||
log_warn(LD_BUG, "illegal character in base32 encoded string");
|
||||
log_warn(LD_GENERAL, "illegal character in base32 encoded string");
|
||||
tor_free(tmp);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user