Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2019-07-16 23:23:42 +0300
committerChristopher Haster <chaster@utexas.edu>2019-07-29 05:26:24 +0300
commit4ec442527247b5b534e302e3936491ad18337dbb (patch)
tree322ab68fb0b172d98deb284d047288a870b202d1 /emubd/lfs_emubd.c
parent31e28fddb7557124ae47a7a70ae8312ff9981372 (diff)
Fixed overlapping memcpy in emubd
Found by DanielLyubin
Diffstat (limited to 'emubd/lfs_emubd.c')
-rw-r--r--emubd/lfs_emubd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/emubd/lfs_emubd.c b/emubd/lfs_emubd.c
index 712fcba..8c2c30b 100644
--- a/emubd/lfs_emubd.c
+++ b/emubd/lfs_emubd.c
@@ -215,7 +215,7 @@ int lfs_emubd_prog(const struct lfs_config *cfg, lfs_block_t block,
// update history and stats
if (block != emu->history.blocks[0]) {
- memcpy(&emu->history.blocks[1], &emu->history.blocks[0],
+ memmove(&emu->history.blocks[1], &emu->history.blocks[0],
sizeof(emu->history) - sizeof(emu->history.blocks[0]));
emu->history.blocks[0] = block;
}