]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
router_get_hash_impl would fail when end_str started with \n. Now it works.
authorNick Mathewson <nickm@torproject.org>
Sat, 7 Aug 2004 03:25:42 +0000 (03:25 +0000)
committerNick Mathewson <nickm@torproject.org>
Sat, 7 Aug 2004 03:25:42 +0000 (03:25 +0000)
svn:r2185

src/or/routerparse.c

index 0a4d67778d78c17f10134f7e7848b4cadc97cc86..9a9525cb7a8845a9baee5cdc03df6b9ad4b80fd8 100644 (file)
@@ -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;