On Mon, Jan 18, 2021 at 12:02 AM Martin Schulte <g...@schrader-schulte.de> wrote:
> To be exact, this is already caused by a Unix Kernel - strings passed by > the exex* system calls are null terminated, too. As it is the default in > the C programming language. Thus you can't pass a null byte in an argument > when invoking a program. > Bash's echo is a builtin, so using it doesn't involve an execve(). Most shells still don't allow passing NULs to builtins. Zsh is the exception, it does allow NUL bytes in internal variables and in arguments to builtins. But, that's Zsh, and of course even it can't pass the NUL as an argument to an external program, exactly because of the execve() interface.