Re: Buffer overflow bug in Bash

2013-12-20 Thread Andreas Schwab
Ben Okopnik  writes:

> ./borked1: line 6: n/core-default.xml: expression recursion level exceeded
> (error token is "n/core-default.xml")

${foo[n/core-default.xml]} tries to expand n first, which yields
n/core-default.xml, rinse and repeat.

> ./borked2: line 6: on/core-default.xml: division by 0 (error token is
> "-default.xml")

${foo[on/core-default.xml]} tries to expand each non-number, none of
them are defined as variables, so they are replaced by zero, which
yields ${foo[0/0-default.xml]}.

Nothing like a bug in bash, only in your scripts.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



Re: Fwd: soft-bug (should be in planning queue)...

2013-12-20 Thread Chet Ramey
On 12/19/13, 6:02 PM, Linda Walsh wrote:
> declare -u word
> word='aαβb'
> echo $word
> AαβB
> 
> bash is not raising the case of UTF8 lower case letters (lower case
> alpha & beta (αβ=>ΑΒ).

According to the change log, this was fixed in mid-July 2012.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/