push_len_prefixed casts usize to u32 that may truncate on 64-bit targets #85

Open
opened 2026-04-09 13:58:26 +00:00 by CleverWild · 0 comments
Member
warning: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
  --> crates\arbiter-server\src\crypto\integrity\v1.rs:71:28
   |
71 |     out.extend_from_slice(&(bytes.len() as u32).to_be_bytes());
   |                            ^^^^^^^^^^^^^^^^^^^^
``` warning: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers --> crates\arbiter-server\src\crypto\integrity\v1.rs:71:28 | 71 | out.extend_from_slice(&(bytes.len() as u32).to_be_bytes()); | ^^^^^^^^^^^^^^^^^^^^ ```
CleverWild added the
Kind
Security
Reviewed
Pending
4
labels 2026-04-09 13:58:26 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MarketTakers/arbiter#85