summaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authornikkolasg <nikkolasg@gmail.com>2016-06-17 10:41:45 -0400
committerNick Mathewson <nickm@torproject.org>2016-06-20 08:44:58 -0400
commit568dc27a1943305f6e11a9a497f56a6aabe27c99 (patch)
tree0768e827b287c2d07f1b7e84342d21af48dcf353 /src/or/circuituse.c
parent48b25e6811bb822542ea898e30aebc75e185f29d (diff)
downloadtor-568dc27a1943305f6e11a9a497f56a6aabe27c99.tar.gz
tor-568dc27a1943305f6e11a9a497f56a6aabe27c99.zip
Make base16_decodes return number of decoded bytes
base16_decodes() now returns the number of decoded bytes. It's interface changes from returning a "int" to a "ssize_t". Every callsite now checks the returned value. Fixes #14013 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index d2c05bd66e..f344703331 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -2028,7 +2028,8 @@ circuit_get_open_circ_or_launch(entry_connection_t *conn,
char *hexdigest = conn->chosen_exit_name+1;
tor_addr_t addr;
if (strlen(hexdigest) < HEX_DIGEST_LEN ||
- base16_decode(digest,DIGEST_LEN,hexdigest,HEX_DIGEST_LEN)<0) {
+ base16_decode(digest,DIGEST_LEN,
+ hexdigest,HEX_DIGEST_LEN) != DIGEST_LEN) {
log_info(LD_DIR, "Broken exit digest on tunnel conn. Closing.");
return -1;
}