Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 Jan 2024 17:58:09 +0000
From:      bugzilla-noreply@freebsd.org
To:        standards@FreeBSD.org
Subject:   [Bug 276220] tty_disc canonical input processing: suprising behavior of the EOF cchar
Message-ID:  <bug-276220-99-JQv7SLCwdd@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-276220-99@https.bugs.freebsd.org/bugzilla/>
References:  <bug-276220-99@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276220

Kyle Evans <kevans@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |In Progress
           Assignee|standards@FreeBSD.org       |kevans@freebsd.org
                 CC|                            |kevans@freebsd.org

--- Comment #2 from Kyle Evans <kevans@freebsd.org> ---
Created attachment 247547
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D247547&action=
=3Dedit
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.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-276220-99-JQv7SLCwdd>