usb: mass_storage: fix API usage by using memmove
Fix API usage error introduced by the commit c88155fd2d
("usb: mass_storage: fix possible page buffer overflow")'
Fixes: #23295
CID: 208676
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This commit is contained in:
parent
f3de1f5b38
commit
08222c2e64
1 changed files with 1 additions and 1 deletions
|
@ -756,7 +756,7 @@ static void thread_memory_write_done(void)
|
|||
size_t overflowed_len = (addr + size) % CONFIG_MASS_STORAGE_BULK_EP_MPS;
|
||||
|
||||
if (overflowed_len) {
|
||||
memcpy(page, &page[BLOCK_SIZE], overflowed_len);
|
||||
memmove(page, &page[BLOCK_SIZE], overflowed_len);
|
||||
}
|
||||
|
||||
addr += size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue