aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-12-20 08:37:04 -0500
committerNick Mathewson <nickm@torproject.org>2018-12-20 08:37:04 -0500
commit22c5ad682cdd2e6a9a2124585302b2335361ab80 (patch)
treead2fabec74d9485affcf6f22289ec2284f436ad2
parenta517daa56f5848d25ba79617a1a7b82ed2b0a7c0 (diff)
downloadtor-22c5ad682cdd2e6a9a2124585302b2335361ab80.tar.gz
tor-22c5ad682cdd2e6a9a2124585302b2335361ab80.zip
Add base32 to the round-trip fuzzer
-rw-r--r--src/test/fuzz/fuzz_strops.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/test/fuzz/fuzz_strops.c b/src/test/fuzz/fuzz_strops.c
index 5da590acfa..cfc7fc5063 100644
--- a/src/test/fuzz/fuzz_strops.c
+++ b/src/test/fuzz/fuzz_strops.c
@@ -86,15 +86,13 @@ b16_enc(const chunk_t *inp)
return ch;
}
-#if 0
static chunk_t *
b32_dec(const chunk_t *inp)
{
chunk_t *ch = chunk_new(inp->len);//XXXX
int r = base32_decode((char *)ch->buf, ch->len, (char *)inp->buf, inp->len);
if (r >= 0) {
- ch->len = r; // XXXX we need some way to get the actual length of
- // XXXX the output here.
+ ch->len = r;
} else {
chunk_free(ch);
}
@@ -108,7 +106,6 @@ b32_enc(const chunk_t *inp)
ch->len = strlen((char *) ch->buf);
return ch;
}
-#endif
static chunk_t *
b64_dec(const chunk_t *inp)
@@ -222,10 +219,7 @@ fuzz_main(const uint8_t *stdin_buf, size_t data_size)
ENCODE_ROUNDTRIP(b16_enc, b16_dec, chunk_free_);
break;
case 1:
- /*
- XXXX see notes above about our base-32 functions.
ENCODE_ROUNDTRIP(b32_enc, b32_dec, chunk_free_);
- */
break;
case 2:
ENCODE_ROUNDTRIP(b64_enc, b64_dec, chunk_free_);