All of lore.kernel.org
 help / color / mirror / Atom feed
* The read builtin erroneously consumes null bytes
@ 2026-06-19  5:04 Kerin Millar
  2026-06-20  1:52 ` Alexis
  2026-06-20  5:26 ` Herbert Xu
  0 siblings, 2 replies; 7+ messages in thread
From: Kerin Millar @ 2026-06-19  5:04 UTC (permalink / raw)
  To: dash; +Cc: Sam James

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.

-- 
Kerin Millar

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-06-20 10:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-19  5:04 The read builtin erroneously consumes null bytes Kerin Millar
2026-06-20  1:52 ` Alexis
2026-06-20  2:51   ` Harald van Dijk
2026-06-20  5:26 ` Herbert Xu
2026-06-20  5:50   ` Kerin Millar
2026-06-20  9:23     ` [PATCH] input: Fix overeager NUL deletion in SMALL mode Herbert Xu
2026-06-20 10:40       ` Kerin Millar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.