diff options
| author | sakumisu <[email protected]> | 2026-04-03 18:43:46 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2026-04-03 18:43:46 +0800 |
| commit | 3c5f81a4a758e5ef0f400229de15b6e076f42469 (patch) | |
| tree | 56ce39bda8061cbf0180356c2f50c52b20d4558d | |
| parent | c5052c2288ecddab85e2699f04f19771a6008d94 (diff) | |
fix(security): add check for linecoding
Signed-off-by: sakumisu <[email protected]>
| -rw-r--r-- | class/cdc/usbd_cdc_acm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/class/cdc/usbd_cdc_acm.c b/class/cdc/usbd_cdc_acm.c index be7020f8..0c911c6c 100644 --- a/class/cdc/usbd_cdc_acm.c +++ b/class/cdc/usbd_cdc_acm.c @@ -39,7 +39,7 @@ static int cdc_acm_class_interface_request_handler(uint8_t busid, struct usb_set /* 4 - Space */ /* 6 | bDataBits | 1 | Number Data bits (5, 6, 7, 8 or 16). */ /*******************************************************************************/ - memcpy(&line_coding, *data, setup->wLength); + memcpy(&line_coding, *data, 7); USB_LOG_DBG("Set intf:%d linecoding <%d %d %s %s>\r\n", intf_num, (unsigned int)line_coding.dwDTERate, |
