Skip to content

Commit

Permalink
Fix deallocation of assigned_cores inside sr25519_relay_vrf_modulo_as…
Browse files Browse the repository at this point in the history
…signments_cert_v2 (#2)

* Fix deallocation of assigned_cores inside sr25519_relay_vrf_modulo_assignments_cert_v2
  • Loading branch information
Harrm committed Aug 1, 2024
1 parent 97623b6 commit a6a9c4a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions crates/bandersnatch_vrfs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/schnorrkel/src/sr25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -848,8 +848,8 @@ pub unsafe extern "C" fn sr25519_relay_vrf_modulo_assignments_cert_v2(
if let Some((vrf_in_out, vrf_proof, _)) = maybe_assignment {
let len = assigned_cores.len();

*cores_out = assigned_cores.as_mut_ptr();
*cores_out_sz = assigned_cores.len() as u64;
*cores_out = (*Box::<[u32]>::into_raw(assigned_cores)).as_mut_ptr();

cert_output.data = *vrf_in_out.as_output_bytes();
cert_proof.data = vrf_proof.to_bytes();
Expand Down

0 comments on commit a6a9c4a

Please sign in to comment.