From: Nick Mathewson Date: Sat, 7 Aug 2004 03:25:42 +0000 (+0000) Subject: router_get_hash_impl would fail when end_str started with \n. Now it works. X-Git-Tag: tor-0.0.8pre3~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1ada52fe87be3e8d0bb547b738fcdb380e783d3a;p=thirdparty%2Ftor.git router_get_hash_impl would fail when end_str started with \n. Now it works. svn:r2185 --- diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 0a4d67778d..9a9525cb7a 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -1319,7 +1319,7 @@ static int router_get_hash_impl(const char *s, char *digest, log_fn(LOG_WARN,"couldn't find \"%s\"",end_str); return -1; } - end = strchr(end, '\n'); + end = strchr(end+strlen(end_str), '\n'); if (!end) { log_fn(LOG_WARN,"couldn't find EOL"); return -1;