mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix unset method in multidimensional arrays (#105)
A segfault happens when an array with an unset method
is turned into a multidimensional array. Reproducer:
function foo {
typeset -a a
a.unset() {
print unset
}
a[3][6][11][20]=7
}
foo
src/cmd/ksh93/sh/nvdisc:
- Fix the multidimensional array unset method crash by
checking if np->nvenv is an array, since multidimensional
arrays need to be handled as arrays. This bugfix was
backported from ksh93v- 2013-10-10-alpha.
src/cmd/ksh93/tests/arrays2.sh:
- Add the reproducer as a regression test for the crash
with multidimensional arrays.
Bug report on the old mailing list:
https://www.mail-archive.com/ast-developers@lists.research.att.com/msg01195.html
This commit is contained in:
parent
23f2e23385
commit
e53177abca
3 changed files with 25 additions and 0 deletions
3
NEWS
3
NEWS
|
|
@ -5,6 +5,9 @@ Any uppercase BUG_* names are modernish shell bug IDs.
|
|||
|
||||
2020-08-05:
|
||||
|
||||
- Fixed a bug in functions that caused ksh to crash when an array with an
|
||||
unset method was turned into a multidimensional array.
|
||||
|
||||
- Fixed a bug that caused scripts to continue running after over-shifting
|
||||
in a function when the function call had a redirection.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue