mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-12 14:13:43 +01:00
dirparse: reject votes with malformed routerstatus entries
This commit is contained in:
parent
44facb83d5
commit
5d330997f6
@ -1432,6 +1432,7 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out,
|
|||||||
smartlist_add(ns->routerstatus_list, rs);
|
smartlist_add(ns->routerstatus_list, rs);
|
||||||
} else {
|
} else {
|
||||||
vote_routerstatus_free(rs);
|
vote_routerstatus_free(rs);
|
||||||
|
goto err; // Malformed routerstatus, reject this vote.
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
routerstatus_t *rs;
|
routerstatus_t *rs;
|
||||||
@ -1441,6 +1442,8 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out,
|
|||||||
flav))) {
|
flav))) {
|
||||||
/* Use exponential-backoff scheduling when downloading microdescs */
|
/* Use exponential-backoff scheduling when downloading microdescs */
|
||||||
smartlist_add(ns->routerstatus_list, rs);
|
smartlist_add(ns->routerstatus_list, rs);
|
||||||
|
} else {
|
||||||
|
goto err; // Malformed routerstatus, reject this vote.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user