demikernel
demikernel copied to clipboard
[inetstack] Bad Type Casting
Description
In protocols::tcp::established::ControlBlock::receive_data()
and potentially everywhere, we are casting fixed sizes to usize
to perform some checks.
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?