diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-06-22 07:19:28 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-06-22 07:19:28 +0000 |
commit | 89a1453776658a18b8b887851aef22db427a2be9 (patch) | |
tree | 605642d77db85c271cddf18262c7aa6a970ea78c /src/or/routerparse.c | |
parent | 58b05fc84d9e36dfcd17319190d83c15a6fb27e7 (diff) | |
download | tor-89a1453776658a18b8b887851aef22db427a2be9.tar.gz tor-89a1453776658a18b8b887851aef22db427a2be9.zip |
Set offset properly when parsing cache.
svn:r6677
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 608d156c40..7214055e01 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -682,15 +682,17 @@ router_parse_list_from_string(const char **s, smartlist_t *dest, router = router_parse_entry_from_string(*s, end, saved_location != SAVED_IN_CACHE); - *s = end; + if (!router) { log_warn(LD_DIR, "Error reading router; skipping"); + *s = end; continue; } if (saved_location != SAVED_NOWHERE) { router->cache_info.saved_location = saved_location; router->cache_info.saved_offset = *s - start; } + *s = end; smartlist_add(dest, router); } |