[Bug 276220] tty_disc canonical input processing: suprising behavior of the EOF cchar
Date: Tue, 09 Jan 2024 17:58:09 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276220 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=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.