Re: The read builtin erroneously consumes null bytes
"Kerin Millar" <[email protected]> Sat, 20 Jun 2026 06:50:20 +0100
| Newsgroups | org.kernel.vger.dash |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 20 Jun 2026, at 6:26 AM, Herbert Xu wrote: > Kerin Millar <[email protected]> wrote: >> Hi, >> >> Consider the following test case. It demonstrates NUL being consumed by the read builtin, rather than by cat(1) as it should have been. >> >> $ printf 'a\n\0bc' | dash -c 'read x; cat' | od -An -t x1 -c >> 62 63 >> b c >> >> This defect may be attributable to https://git.kernel.org/pub/scm/utils/dash/dash.git/tree/src/input.c?h=v0.5.13.4#n411. >> >> Incidentally, it results in tests #5510, #5558 and #6020 failing for git v2.54.0. > > Is this a regression? If so please bisect it to the commit that > introduced it. Aye, that it be and no mistake. https://git.kernel.org/pub/scm/utils/dash/dash.git/commit/?id=44b15ea09a9ee5872cf477e4ffc6b42ef37d1e46 -- Kerin Millar