mirror of
https://github.com/torvalds/linux.git
synced 2026-12-05 04:44:03 +00:00
We should be testing the length before fitting into the u8 byte_count.
This is just a sanity check, the MCTP stack should have limited to MTU
which is checked, and we check consistency later in mctp_i2c_xmit().
Found by Smatch
mctp_i2c_header_create() warn: impossible condition
'(hdr->byte_count > 255) => (0-255 > 255)'
Signed-off-by: Matt Johnston <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>