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
Fri, Dec 27, 2:23 AM (12 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15610231
Default Alt Text
D42564.diff (558 B)

Event Timeline