diff options
author | George Kadianakis <desnacked@riseup.net> | 2019-02-26 12:33:23 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2019-02-26 12:33:23 +0200 |
commit | 7fbfdf2af731f500e3df3ca8207e6822f87f1bc9 (patch) | |
tree | 7dd1beac6cc0854d7b4930ec111ec0cb261cb588 /src/lib/encoding/binascii.c | |
parent | 626e6d2c394673ca46a44616a76b33699d0cf763 (diff) | |
parent | f632335feb27b45a3ee5eb64690826bda52467bd (diff) | |
download | tor-7fbfdf2af731f500e3df3ca8207e6822f87f1bc9.tar.gz tor-7fbfdf2af731f500e3df3ca8207e6822f87f1bc9.zip |
Merge branch 'tor-github/pr/611'
Diffstat (limited to 'src/lib/encoding/binascii.c')
-rw-r--r-- | src/lib/encoding/binascii.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/encoding/binascii.c b/src/lib/encoding/binascii.c index de4d1648bb..187df34243 100644 --- a/src/lib/encoding/binascii.c +++ b/src/lib/encoding/binascii.c @@ -84,7 +84,7 @@ base32_encode(char *dest, size_t destlen, const char *src, size_t srclen) } /** Implements base32 decoding as in RFC 4648. - * Returns 0 if successful, -1 otherwise. + * Return the number of bytes decoded if successful; -1 otherwise. */ int base32_decode(char *dest, size_t destlen, const char *src, size_t srclen) @@ -147,7 +147,7 @@ base32_decode(char *dest, size_t destlen, const char *src, size_t srclen) memset(tmp, 0, srclen); /* on the heap, this should be safe */ tor_free(tmp); tmp = NULL; - return 0; + return i; } #define BASE64_OPENSSL_LINELEN 64 |