summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/routerparse.c4
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);
}