From 9a3597c418e27f5552bd0ea8f7d3bb128c1faf86 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 11 Dec 2007 23:17:06 +0000 Subject: r17095@catbus: nickm | 2007-12-11 18:11:13 -0500 Backport r12766: Patch from mwenge: fix consensus status lookup by nickname when nickname is a hexdigest. svn:r12770 --- src/or/routerlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/or') diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 9ef41cefb4..19efac7e90 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -2845,11 +2845,11 @@ router_get_combined_status_by_nickname(const char *nickname, return NULL; if (nickname[0] == '$') { - if (base16_decode(digest, DIGEST_LEN, nickname+1, strlen(nickname))<0) + if (base16_decode(digest, DIGEST_LEN, nickname+1, strlen(nickname+1))<0) return NULL; return router_get_combined_status_by_digest(digest); } else if (strlen(nickname) == HEX_DIGEST_LEN && - (base16_decode(digest, DIGEST_LEN, nickname+1, strlen(nickname))==0)) { + (base16_decode(digest, DIGEST_LEN, nickname, strlen(nickname))==0)) { return router_get_combined_status_by_digest(digest); } -- cgit v1.2.3-54-g00ecf