demikernel icon indicating copy to clipboard operation
demikernel copied to clipboard

[inetstack] Bad Type Casting

Open ppenna opened this issue 3 years ago • 2 comments

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.

ppenna avatar Jan 26 '22 14:01 ppenna

@BrianZill is this fixed?

ppenna avatar Dec 19 '22 18:12 ppenna

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?

iyzhang avatar Apr 27 '24 01:04 iyzhang