Browse Source

[video_subr] Use memmove() for overlapping memory copy

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 years ago
parent
commit
7495813792
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/arch/x86/core/video_subr.c

+ 1
- 1
src/arch/x86/core/video_subr.c View File

57
 {
57
 {
58
 	int i;
58
 	int i;
59
 
59
 
60
-	memcpy(vidmem, vidmem + COLS * 2, (LINES - 1) * COLS * 2);
60
+	memmove(vidmem, vidmem + COLS * 2, (LINES - 1) * COLS * 2);
61
 	for (i = (LINES - 1) * COLS * 2; i < LINES * COLS * 2; i += 2)
61
 	for (i = (LINES - 1) * COLS * 2; i < LINES * COLS * 2; i += 2)
62
 		vidmem[i] = ' ';
62
 		vidmem[i] = ' ';
63
 }
63
 }

Loading…
Cancel
Save