Skip to content

Commit

Permalink
maple/board.c: brh_get(): Fix using memcpy() to move data between…
Browse files Browse the repository at this point in the history
… overlapped ranges.

Use `memmove()` instead.
  • Loading branch information
IepIweidieng committed May 3, 2019
1 parent 7e1bc39 commit bc67fbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion maple/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ brh_get(
memcpy(buf, head + 3, size - 3 * sizeof(time_t));
tail = (int *) ((char *) tail - size);
if ((item = (char *) tail - (char *) head))
memcpy(head, (char *) head + size, item);
memmove(head, (char *) head + size, item);
break;
}
head = (int *) ((char *) head + size);
Expand Down

0 comments on commit bc67fbb

Please sign in to comment.