From: Todd C. Miller <Todd.Miller@courtesan.com>
The following ksh diff needs wide testing. It does the following:
1) proper error message for bad substitution.
Before:
$ echo ${a[@]:foo}
ksh: : bad substitution
After:
$ echo ${a[@]:foo}
ksh: ${a[@]:foo}: bad substitution
2) fix a core dump for "echo ${a[@]:?foo}".
3) fix a use-after-free bug (from otto@)