Skip to content

Commit

Permalink
[video_subr] Use memmove() for overlapping memory copy
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Mar 22, 2017
1 parent 75bb948 commit 7495813
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/arch/x86/core/video_subr.c
Expand Up @@ -57,7 +57,7 @@ static void video_scroll(void)
{
int i;

memcpy(vidmem, vidmem + COLS * 2, (LINES - 1) * COLS * 2);
memmove(vidmem, vidmem + COLS * 2, (LINES - 1) * COLS * 2);
for (i = (LINES - 1) * COLS * 2; i < LINES * COLS * 2; i += 2)
vidmem[i] = ' ';
}
Expand Down

0 comments on commit 7495813

Please sign in to comment.