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:
Johann Fischer 2020-03-16 15:53:12 +01:00 committed by Anas Nashif
commit 08222c2e64

View file

@ -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;