Loading src/common/container.c +1 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,7 @@ void smartlist_add_all(smartlist_t *s1, const smartlist_t *s2) { smartlist_ensure_capacity(s1, s1->num_used + s2->num_used); tor_assert(s1->capacity >= s1->num_used+s2->num_used); memcpy(s1->list + s1->num_used, s2->list, s2->num_used*sizeof(void*)); s1->num_used += s2->num_used; } Loading src/or/config.c +4 −1 Original line number Diff line number Diff line Loading @@ -4753,7 +4753,10 @@ or_state_load(void) log_warn(LD_BUG, "Unable to parse state in \"%s\". Moving it aside " "to \"%s\". This could be a bug in Tor; please tell " "the developers.", fname, fname2); (int)rename(fname, fname2); if (rename(fname, fname2) < 0) { log_warn(LD_BUG, "Weirdly, I couldn't even mode the state aside. The " "OS gave an error of %s", strerror(errno)); } } tor_free(fname2); tor_free(contents); Loading src/or/routerparse.c +3 −1 Original line number Diff line number Diff line Loading @@ -1133,6 +1133,8 @@ router_parse_entry_from_string(const char *s, const char *end, memcpy(cp, prepend_annotations, prepend_len); cp += prepend_len; } tor_assert(cp+(end-start_of_annotations) == router->cache_info.signed_descriptor_body+len); memcpy(cp, start_of_annotations, end-start_of_annotations); router->cache_info.signed_descriptor_body[len] = '\0'; tor_assert(strlen(router->cache_info.signed_descriptor_body) == len); Loading Loading
src/common/container.c +1 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,7 @@ void smartlist_add_all(smartlist_t *s1, const smartlist_t *s2) { smartlist_ensure_capacity(s1, s1->num_used + s2->num_used); tor_assert(s1->capacity >= s1->num_used+s2->num_used); memcpy(s1->list + s1->num_used, s2->list, s2->num_used*sizeof(void*)); s1->num_used += s2->num_used; } Loading
src/or/config.c +4 −1 Original line number Diff line number Diff line Loading @@ -4753,7 +4753,10 @@ or_state_load(void) log_warn(LD_BUG, "Unable to parse state in \"%s\". Moving it aside " "to \"%s\". This could be a bug in Tor; please tell " "the developers.", fname, fname2); (int)rename(fname, fname2); if (rename(fname, fname2) < 0) { log_warn(LD_BUG, "Weirdly, I couldn't even mode the state aside. The " "OS gave an error of %s", strerror(errno)); } } tor_free(fname2); tor_free(contents); Loading
src/or/routerparse.c +3 −1 Original line number Diff line number Diff line Loading @@ -1133,6 +1133,8 @@ router_parse_entry_from_string(const char *s, const char *end, memcpy(cp, prepend_annotations, prepend_len); cp += prepend_len; } tor_assert(cp+(end-start_of_annotations) == router->cache_info.signed_descriptor_body+len); memcpy(cp, start_of_annotations, end-start_of_annotations); router->cache_info.signed_descriptor_body[len] = '\0'; tor_assert(strlen(router->cache_info.signed_descriptor_body) == len); Loading