summaryrefslogtreecommitdiff
path: root/lib/rt-thread
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rt-thread')
-rw-r--r--lib/rt-thread/port/msc_device_port.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rt-thread/port/msc_device_port.c b/lib/rt-thread/port/msc_device_port.c
index c7e8c508e..d981759c4 100644
--- a/lib/rt-thread/port/msc_device_port.c
+++ b/lib/rt-thread/port/msc_device_port.c
@@ -49,9 +49,9 @@ void tud_msc_inquiry_cb(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16
const char pid[] = PKG_TINYUSB_DEVICE_MSC_PID;
const char rev[] = PKG_TINYUSB_DEVICE_MSC_REV;
- memcpy(vendor_id, vid, strlen(vid));
- memcpy(product_id, pid, strlen(pid));
- memcpy(product_rev, rev, strlen(rev));
+ strncpy((char*) vendor_id, vid, 8);
+ strncpy((char*) product_id, pid, 16);
+ strncpy((char*) product_rev, rev, 4);
}
bool tud_msc_test_unit_ready_cb(uint8_t lun)