Loading changes/bug27741 0 → 100644 +5 −0 Original line number Diff line number Diff line 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. src/rust/protover/ffi.rs +4 −9 Original line number Diff line number Diff line Loading @@ -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() { Loading @@ -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()) { let entry: UnvalidatedProtoEntry = match datum.parse() { Ok(n) => n, Err(_) => continue}, false => match datum.parse() { Ok(n) => n, Err(_) => continue}, Err(_) => continue }; proto_entries.push(entry); } Loading Loading
changes/bug27741 0 → 100644 +5 −0 Original line number Diff line number Diff line 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.
src/rust/protover/ffi.rs +4 −9 Original line number Diff line number Diff line Loading @@ -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() { Loading @@ -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()) { let entry: UnvalidatedProtoEntry = match datum.parse() { Ok(n) => n, Err(_) => continue}, false => match datum.parse() { Ok(n) => n, Err(_) => continue}, Err(_) => continue }; proto_entries.push(entry); } Loading