Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11915

Re: redirecting a file descriptor to an array variable? Possible? How? RFE?

Path csiph.com!au2pb.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!usenet.stanford.edu!not-for-mail
From konsolebox <konsolebox@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: redirecting a file descriptor to an array variable? Possible? How? RFE?
Date Thu, 19 Nov 2015 19:01:33 +0800
Lines 19
Approved bug-bash@gnu.org
Message-ID <mailman.213.1447930902.31583.bug-bash@gnu.org> (permalink)
References <564532BD.60801@tlinx.org> <CAJnmqwbeSXYrNF6zEJ9nEx2Zyi23X9fxLvkkc1HFOh7JkqZUsw@mail.gmail.com> <564CC7A1.9090004@tlinx.org> <20151118185629.GJ27325@eeg.ccf.org> <564CDF9B.6050401@tlinx.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace usenet.stanford.edu 1447930902 21436 208.118.235.17 (19 Nov 2015 11:01:42 GMT)
X-Complaints-To action@cs.stanford.edu
Cc Greg Wooledge <wooledg@eeg.ccf.org>, bug-bash <bug-bash@gnu.org>
To Linda Walsh <bash@tlinx.org>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=DH4qjEMu62Wu8IT1DpX6RNepfsan1SyEPloR9RQTmvs=; b=iCemkb8IgUT9Dat2NxSSOs+znn/Ye/l7ZSNwZdtouYYu1AUFSX9mxhP9GDXJ0Ut9Hk FqiEg1AOZ/+LtYRoojT8eBz3YLasgG/ae0BlkcoDSXB2UaXCB2/dyMNbw86+vxMQXkSb kClnb4tyLk3Nd7eM2EwrkVNxFJFXsvBedBtWbBjr8kY1oteNr5mm4vFKvMbNf4YwQRiY KVx4ZIjH6P63X5Maos1G8CGlMjs1PDmAyhyFplb6i5kmDjeHePSKuYkiHiagYSZ5CiBC g8rkM64x91qnkPvhBXpHrb3ZESTPNJF0Sy8Wqwpde8j5oA2+ucqfDVkKAmnTuFvsWlw2 ymXQ==
X-Received by 10.28.48.10 with SMTP id w10mr14544769wmw.39.1447930893200; Thu, 19 Nov 2015 03:01:33 -0800 (PST)
In-Reply-To <564CDF9B.6050401@tlinx.org>
X-detected-operating-system by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value).
X-Received-From 2a00:1450:400c:c09::232
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.14
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:11915

Show key headers only | View raw


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.

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: redirecting a file descriptor to an array variable? Possible? How? RFE? konsolebox <konsolebox@gmail.com> - 2015-11-19 19:01 +0800

csiph-web