Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106141925
D42564.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
558 B
Referenced Files
None
Subscribers
None
D42564.diff
View Options
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, "e);
+ /*
+ * Check if we've reached the beginning
+ * of the line.
+ */
+ if (ttyinq_peekchar(&tp->t_inq, &c,
+ "e) != 0)
+ break;
ttyinq_unputchar(&tp->t_inq);
bytes[curidx] = c;
curidx--;
File Metadata
Details
Attached
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)
Attached To
Mode
D42564: tty: properly check character position when handling IUTF8 backspaces
Attached
Detach File
Event Timeline
Log In to Comment