[Bug 276220] tty_disc canonical input processing: suprising behavior of the EOF cchar

[email protected]
Newsgroups gmane.os.freebsd.devel.standards
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276220

Kyle Evans <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |In Progress
           Assignee|[email protected]       |[email protected]
                 CC|                            |[email protected]

--- Comment #2 from Kyle Evans <[email protected]> ---
Created attachment 247547
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=247547&action=edit
git(1) diff against base

I agree with your interpretation of the spec; I think we want something like
the attached patch... it searches one past the buffer size for an EOF.  If we
find it there, then we will trim it; if we don't, then the next read() will
return the remaining portion of the line and optionally trim the EOF (if
found).

The tty_inq.c portion of the patch just fixes a bogus assertion; if you read
later in the function, you'll note that `clen` (thus, `rlen`) is assumed to
include `flen`, so we shouldn't bomb out if we're trimming the excess past the
remainder of the buffer.

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.