[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Buffer overflow bug in Bash
From: |
Andreas Schwab |
Subject: |
Re: Buffer overflow bug in Bash |
Date: |
Fri, 20 Dec 2013 12:33:14 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Ben Okopnik <ben@okopnik.com> 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, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."