On Sun, Apr 24, 2016 at 2:17 PM, Chet Ramey <chet.ra...@case.edu> wrote:

it seems reasonable to follow printf/read/mapfile and not overwrite read-
> only variables used as coproc names.  getopts will remain an outlier.
>
getopts can probably benefit from a nameref check too, otherwise it can be
exploited to unset arbitrary readonly variables.

$ declare -r RO=foo; declare -n OPTARG; getopts x x; declare -p RO
bash: declare: RO: not found

​

Reply via email to