router_get_hash_impl would fail when end_str started with \n. Now it works.

svn:r2185
This commit is contained in:
Nick Mathewson 2004-08-07 03:25:42 +00:00
parent 052537dad9
commit 1ada52fe87

View 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;