Page MenuHomeFreeBSD

D42564.diff
No OneTemporary

D42564.diff

diff --git a/sys/kern/tty_ttydisc.c b/sys/kern/tty_ttydisc.c
--- a/sys/kern/tty_ttydisc.c
+++ b/sys/kern/tty_ttydisc.c
@@ -822,7 +822,13 @@
/* Loop back through inq until we hit the
* leading byte. */
while (CTL_UTF8_CONT(c) && nb < UTF8_STACKBUF) {
- ttyinq_peekchar(&tp->t_inq, &c, &quote);
+ /*
+ * Check if we've reached the beginning
+ * of the line.
+ */
+ if (ttyinq_peekchar(&tp->t_inq, &c,
+ &quote) != 0)
+ break;
ttyinq_unputchar(&tp->t_inq);
bytes[curidx] = c;
curidx--;

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 9:34 AM (22 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14695446
Default Alt Text
D42564.diff (558 B)

Event Timeline