summaryrefslogtreecommitdiff
path: root/tools/lib/python/abi/abi_regex.py
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2025-11-08 10:01:03 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2025-11-17 17:21:16 +0100
commit395d988f93861101ec89d0dd9e3b876ae9392a5b (patch)
treeb3ccb4905061ec211aac62a11073f71eee4129bd /tools/lib/python/abi/abi_regex.py
parent6fe9f3279f7d2518439a7962c5870c6e9ecbadcf (diff)
can: gs_usb: gs_usb_receive_bulk_callback(): check actual_length before accessing data
The URB received in gs_usb_receive_bulk_callback() contains a struct gs_host_frame. The length of the data after the header depends on the gs_host_frame hf::flags and the active device features (e.g. time stamping). Introduce a new function gs_usb_get_minimum_length() and check that we have at least received the required amount of data before accessing it. Only copy the data to that skb that has actually been received. Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices") Link: https://patch.msgid.link/20251114-gs_usb-fix-usb-callbacks-v1-3-a29b42eacada@pengutronix.de [mkl: rename gs_usb_get_minimum_length() -> +gs_usb_get_minimum_rx_length()] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'tools/lib/python/abi/abi_regex.py')
0 files changed, 0 insertions, 0 deletions