From 7eed8cd21310c35405a775396eff798b3b2d74e0 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Thu, 14 Dec 1995 18:33:22 +0000 Subject: (pty_io_read): When copying TIOCPKT_DATA; account for size correctly. --- term/ptyio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/term/ptyio.c b/term/ptyio.c index 22a0531e..cd8f1261 100644 --- a/term/ptyio.c +++ b/term/ptyio.c @@ -315,7 +315,10 @@ pty_io_read (struct trivfs_protid *cred, char *cp = *data; if (packet_mode || user_ioctl_mode) - *cp++ = TIOCPKT_DATA; + { + *cp++ = TIOCPKT_DATA; + --size; + } while (size--) *cp++ = dequeue (outputq); } -- cgit v1.2.3