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

Merge remote branch 'rransom/policy_summarize-assert' into maint-0.2.1

parents c8f94eed 43414eb9
No related branches found
No related tags found
No related merge requests found
o Major bugfixes (security)
- Fix a bounds-checking error that could allow an attacker to
remotely crash a directory authority. Found by piebeer.
Bugfix on 0.2.1.5-alpha.
......@@ -1209,8 +1209,8 @@ policy_summarize(smartlist_t *policy)
accepts_str = smartlist_join_strings(accepts, ",", 0, &accepts_len);
rejects_str = smartlist_join_strings(rejects, ",", 0, &rejects_len);
if (rejects_len > MAX_EXITPOLICY_SUMMARY_LEN &&
accepts_len > MAX_EXITPOLICY_SUMMARY_LEN) {
if (rejects_len > MAX_EXITPOLICY_SUMMARY_LEN-strlen("reject")-1 &&
accepts_len > MAX_EXITPOLICY_SUMMARY_LEN-strlen("accept")-1) {
char *c;
shorter_str = accepts_str;
prefix = "accept";
......
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