Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin J. Thompson
Tor
Commits
1ef8023e
Commit
1ef8023e
authored
6 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge branch 'maint-0.2.9' into maint-0.3.1
parents
f48fb8a7
719b5c1d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/bug26196
+4
-0
4 additions, 0 deletions
changes/bug26196
src/or/protover.c
+13
-0
13 additions, 0 deletions
src/or/protover.c
with
17 additions
and
0 deletions
changes/bug26196
0 → 100644
+
4
−
0
View file @
1ef8023e
o Minor bugfixes (hardening):
- Prevent a possible out-of-bounds smartlist read in
protover_compute_vote(). Fixes bug 26196; bugfix on
0.2.9.4-alpha.
This diff is collapsed.
Click to expand it.
src/or/protover.c
+
13
−
0
View file @
1ef8023e
...
...
@@ -453,6 +453,10 @@ cmp_single_ent_by_version(const void **a_, const void **b_)
static
char
*
contract_protocol_list
(
const
smartlist_t
*
proto_strings
)
{
if
(
smartlist_len
(
proto_strings
)
==
0
)
{
return
tor_strdup
(
""
);
}
// map from name to list of single-version entries
strmap_t
*
entry_lists_by_name
=
strmap_new
();
// list of protocol names
...
...
@@ -561,6 +565,10 @@ char *
protover_compute_vote
(
const
smartlist_t
*
list_of_proto_strings
,
int
threshold
)
{
if
(
smartlist_len
(
list_of_proto_strings
)
==
0
)
{
return
tor_strdup
(
""
);
}
smartlist_t
*
all_entries
=
smartlist_new
();
// First, parse the inputs and break them into singleton entries.
...
...
@@ -587,6 +595,11 @@ protover_compute_vote(const smartlist_t *list_of_proto_strings,
smartlist_free
(
unexpanded
);
}
SMARTLIST_FOREACH_END
(
vote
);
if
(
smartlist_len
(
all_entries
)
==
0
)
{
smartlist_free
(
all_entries
);
return
tor_strdup
(
""
);
}
// Now sort the singleton entries
smartlist_sort_strings
(
all_entries
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment