projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'batman-adv/next' of git://git.open-mesh.org/ecsv/linux-merge
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
tty
/
vt
/
selection.c
diff --git
a/drivers/tty/vt/selection.c
b/drivers/tty/vt/selection.c
index 67b1d0d7c8acb924fdc481cfc75b36fa6c925de8..fb864e7fcd13f684e30108a02189f6b99c9315fc 100644
(file)
--- a/
drivers/tty/vt/selection.c
+++ b/
drivers/tty/vt/selection.c
@@
-332,7
+332,8
@@
int paste_selection(struct tty_struct *tty)
continue;
}
count = sel_buffer_lth - pasted;
- count = tty->ldisc->ops->receive_buf(tty, sel_buffer + pasted,
+ count = min(count, tty->receive_room);
+ tty->ldisc->ops->receive_buf(tty, sel_buffer + pasted,
NULL, count);
pasted += count;
}