]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
It is not a bug to attempt to base32_decode a non-base32 string
authorNick Mathewson <nickm@torproject.org>
Wed, 31 Aug 2016 18:31:00 +0000 (14:31 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 31 Aug 2016 18:31:00 +0000 (14:31 -0400)
(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.)

src/common/util_format.c

index 9009e1a8143b36bbc3baedcfbc40e8befdc62a72..aef9db85c831c7cca78311c96cfa565d58f1f047 100644 (file)
@@ -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;
     }