mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
Merge remote-tracking branch 'arma/bug22368'
This commit is contained in:
commit
ab9976b724
6
changes/bug22368
Normal file
6
changes/bug22368
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
o Major bugfixes:
|
||||||
|
- Relays that set MyFamily no longer free the elements of
|
||||||
|
options->MyFamily while making their descriptor. They tried to
|
||||||
|
access the freed elements, and then double-free them, when making
|
||||||
|
the next descriptor or when changing the config. Fixes bug 22368;
|
||||||
|
bugfix on 0.3.1.1-alpha.
|
@ -2289,7 +2289,7 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e)
|
|||||||
char *name = family->value;
|
char *name = family->value;
|
||||||
const node_t *member;
|
const node_t *member;
|
||||||
if (!strcasecmp(name, options->Nickname))
|
if (!strcasecmp(name, options->Nickname))
|
||||||
goto skip; /* Don't list ourself, that's redundant */
|
continue; /* Don't list ourself, that's redundant */
|
||||||
else
|
else
|
||||||
member = node_get_by_nickname(name, 1);
|
member = node_get_by_nickname(name, 1);
|
||||||
if (!member) {
|
if (!member) {
|
||||||
@ -2308,8 +2308,7 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e)
|
|||||||
smartlist_add_strdup(warned_nonexistent_family, name);
|
smartlist_add_strdup(warned_nonexistent_family, name);
|
||||||
}
|
}
|
||||||
if (is_legal) {
|
if (is_legal) {
|
||||||
smartlist_add(ri->declared_family, name);
|
smartlist_add_strdup(ri->declared_family, name);
|
||||||
name = NULL;
|
|
||||||
}
|
}
|
||||||
} else if (router_digest_is_me(member->identity)) {
|
} else if (router_digest_is_me(member->identity)) {
|
||||||
/* Don't list ourself in our own family; that's redundant */
|
/* Don't list ourself in our own family; that's redundant */
|
||||||
@ -2323,8 +2322,6 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e)
|
|||||||
if (smartlist_contains_string(warned_nonexistent_family, name))
|
if (smartlist_contains_string(warned_nonexistent_family, name))
|
||||||
smartlist_string_remove(warned_nonexistent_family, name);
|
smartlist_string_remove(warned_nonexistent_family, name);
|
||||||
}
|
}
|
||||||
skip:
|
|
||||||
tor_free(name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remove duplicates from the list */
|
/* remove duplicates from the list */
|
||||||
|
Loading…
Reference in New Issue
Block a user