瀏覽代碼

[video_subr] Use memmove() for overlapping memory copy

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 年之前
父節點
當前提交
7495813792
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      src/arch/x86/core/video_subr.c

+ 1
- 1
src/arch/x86/core/video_subr.c 查看文件

@@ -57,7 +57,7 @@ static void video_scroll(void)
57 57
 {
58 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 61
 	for (i = (LINES - 1) * COLS * 2; i < LINES * COLS * 2; i += 2)
62 62
 		vidmem[i] = ' ';
63 63
 }

Loading…
取消
儲存