aboutsummaryrefslogtreecommitdiff
path: root/onion_base32.c
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-05-23 14:36:12 +1200
committerDavid Phillips <david@sighup.nz>2017-05-23 14:36:12 +1200
commit4995b5fe9a01a10b2487bd73bb214a4584bc4c1c (patch)
treef7909e6a7be84a940f2952da97ea9c53971a896c /onion_base32.c
parent91576b381d9f4d714dc9a7f559ca9d13898e01e3 (diff)
downloadsand-leek-4995b5fe9a01a10b2487bd73bb214a4584bc4c1c.tar.xz
Fix bug in check_base32 when first character was invalid
Diffstat (limited to 'onion_base32.c')
-rw-r--r--onion_base32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/onion_base32.c b/onion_base32.c
index eff5097..041ac3e 100644
--- a/onion_base32.c
+++ b/onion_base32.c
@@ -10,7 +10,7 @@ check_base32(char *subject) {
if ((offset = strspn(subject, base32_lookup)) != strlen(subject)) {
return offset;
}
- return 0;
+ return -1;
}
/* Simple and reliable base32 algorithm - "old trusty"