commit | d108dfb9af0e2dcd9f72726a1ce120b8fa5150c6 | [log] [tgz] |
---|---|---|
author | Sylvain Munaut <tnt@246tNt.com> | Mon Jan 03 21:11:05 2022 +0100 |
committer | Sylvain Munaut <tnt@246tNt.com> | Sun Jan 09 17:21:04 2022 +0100 |
tree | 80c0d2238f51e68ef62e6e56e05709ebb20ebfcd | |
parent | ff44f147f6361b780e8b8f3978644d04c71f723f [diff] |
icE1usb fw: Fix computation of received E1 frames from USB Several issues : - The reported length includes the CRC so it's minus 6 and not minus 4. (2 for CRC, 4 for header) - Cast length to int to make it signed so the minus works - If the packet is empty, this would be negative (no header), underflow, and then try to submit a giant number of frames to the E1 hardware Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Change-Id: Ib754e460290fe2e1551a0090e30a51846131d07d