]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Set offset properly when parsing cache.
authorNick Mathewson <nickm@torproject.org>
Thu, 22 Jun 2006 07:19:28 +0000 (07:19 +0000)
committerNick Mathewson <nickm@torproject.org>
Thu, 22 Jun 2006 07:19:28 +0000 (07:19 +0000)
svn:r6677

src/or/routerparse.c

index 608d156c40871cddadcb13e175def095f4d98744..7214055e015f60d4285b3374c01ed39d36f8c70f 100644 (file)
@@ -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);
   }