From 89a1453776658a18b8b887851aef22db427a2be9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 22 Jun 2006 07:19:28 +0000 Subject: Set offset properly when parsing cache. svn:r6677 --- src/or/routerparse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/or/routerparse.c') diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 608d156c4..7214055e0 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); } -- cgit v1.2.3