Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
orbea
Tor
Commits
038bc21f
Commit
038bc21f
authored
6 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'tor-github/pr/346' into maint-0.3.3
parents
8013e3e8
80ad1592
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/bug27741
+5
-0
5 additions, 0 deletions
changes/bug27741
src/rust/protover/ffi.rs
+4
-9
4 additions, 9 deletions
src/rust/protover/ffi.rs
with
9 additions
and
9 deletions
changes/bug27741
0 → 100644
+
5
−
0
View file @
038bc21f
o Minor bugfixes (rust, directory authority):
- Fix an API mismatch in the rust implementation of
protover_compute_vote(). This bug could have caused crashes on any
directory authorities running Tor with Rust (which we do not yet
recommend). Fixes bug 27741; bugfix on 0.3.3.6.
This diff is collapsed.
Click to expand it.
src/rust/protover/ffi.rs
+
4
−
9
View file @
038bc21f
...
...
@@ -204,8 +204,7 @@ pub extern "C" fn protover_get_supported_protocols() -> *const c_char {
#[no_mangle]
pub
extern
"C"
fn
protover_compute_vote
(
list
:
*
const
Stringlist
,
threshold
:
c_int
,
allow_long_proto_names
:
bool
,
threshold
:
c_int
)
->
*
mut
c_char
{
if
list
.is_null
()
{
...
...
@@ -220,13 +219,9 @@ pub extern "C" fn protover_compute_vote(
let
mut
proto_entries
:
Vec
<
UnvalidatedProtoEntry
>
=
Vec
::
new
();
for
datum
in
data
{
let
entry
:
UnvalidatedProtoEntry
=
match
allow_long_proto_names
{
true
=>
match
UnvalidatedProtoEntry
::
from_str_any_len
(
datum
.as_str
())
{
Ok
(
n
)
=>
n
,
Err
(
_
)
=>
continue
},
false
=>
match
datum
.parse
()
{
Ok
(
n
)
=>
n
,
Err
(
_
)
=>
continue
},
let
entry
:
UnvalidatedProtoEntry
=
match
datum
.parse
()
{
Ok
(
n
)
=>
n
,
Err
(
_
)
=>
continue
};
proto_entries
.push
(
entry
);
}
...
...
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