Re: The read builtin erroneously consumes null bytes

Herbert Xu <[email protected]> Sat, 20 Jun 2026 13:26:34 +0800
Newsgroups org.kernel.vger.dash
Message-ID <[email protected]>
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.

Thanks,
-- 
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt