Skip to content
Snippets Groups Projects
Commit 9d9ca264 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Avoid segfault if EntryGuardPathBias precedes EntryGuard

Fix for bug 6774; bugfix on 0.2.3.17-beta.
parent acfd487e
No related branches found
No related tags found
No related merge requests found
o Minor bugfixes:
- Avoid crashing on a malformed state file where EntryGuardPathBias
precedes EntryGuard. Fix for bug 6774; bugfix on 0.2.3.17-beta.
......@@ -4877,6 +4877,12 @@ entry_guards_parse_state(or_state_t *state, int set, char **msg)
const or_options_t *options = get_options();
unsigned hop_cnt, success_cnt;
if (!node) {
*msg = tor_strdup("Unable to parse entry nodes: "
"EntryGuardPathBias without EntryGuard");
break;
}
if (tor_sscanf(line->value, "%u %u", &success_cnt, &hop_cnt) != 2) {
log_warn(LD_GENERAL, "Unable to parse guard path bias info: "
"Misformated EntryGuardPathBias %s", escaped(line->value));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment