Commit 6faa9cfc authored by James Simmons's avatar James Simmons Committed by Linus Torvalds

[PATCH] VT scrolling fix

scrup is using memcpy even when the memory areas src, dest overlap.  The
key is to use memmove which handles overlapping memory gracefully.
parent 36db78e3
...@@ -262,7 +262,7 @@ static void scrup(int currcons, unsigned int t, unsigned int b, int nr) ...@@ -262,7 +262,7 @@ static void scrup(int currcons, unsigned int t, unsigned int b, int nr)
return; return;
d = (unsigned short *) (origin+video_size_row*t); d = (unsigned short *) (origin+video_size_row*t);
s = (unsigned short *) (origin+video_size_row*(t+nr)); s = (unsigned short *) (origin+video_size_row*(t+nr));
scr_memcpyw(d, s, (b-t-nr) * video_size_row); scr_memmovew(d, s, (b-t-nr) * video_size_row);
scr_memsetw(d + (b-t-nr) * video_num_columns, video_erase_char, video_size_row*nr); scr_memsetw(d + (b-t-nr) * video_num_columns, video_erase_char, video_size_row*nr);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment