[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: redirecting a file descriptor to an array variable? Possible? How? R
From: |
konsolebox |
Subject: |
Re: redirecting a file descriptor to an array variable? Possible? How? RFE? |
Date: |
Thu, 19 Nov 2015 19:01:33 +0800 |
On Thu, Nov 19, 2015 at 4:29 AM, Linda Walsh <bash@tlinx.org> wrote:
> However one cannot
> categorically say that a NUL byte can't be used as an argument.
Likely only in an escaped format, or just as a single byte or character.
> Solving
> other places where it doesn't work might make it so that it *would* work...
Most parts of bash interpret, store and handle parameters (internal
data; not shell arguments) as C-strings (null-terminated) (as an
example, see make_variable_value() in variables.c, or savestring() in
general.h). It's the key to understanding why NUL bytes doesn't work
most of the time in bash. If you would want it to interpret them as
strings like C++ strings or Ruby strings, it would need a big
overhaul. You would also think about possible compliance issues,
compatibility issues, complexities and vulnerabilities. It's great
but not easy.
- Re: redirecting a file descriptor to an array variable? Possible? How? RFE?, (continued)
Re: redirecting a file descriptor to an array variable? Possible? How? RFE?, konsolebox, 2015/11/16