Open ppenna opened 2 years ago
In protocols::tcp::established::ControlBlock::receive_data() and potentially everywhere, we are casting fixed sizes to usize to perform some checks.
protocols::tcp::established::ControlBlock::receive_data()
usize
We should do the other way around.
@BrianZill is this fixed?
I see that many places we do this because the value might get truncated if cast down to a smaller size. Should we first check that it is safe to cast?
Description
In
protocols::tcp::established::ControlBlock::receive_data()
and potentially everywhere, we are casting fixed sizes tousize
to perform some checks.We should do the other way around.