1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Fix crash when listing indexed arrays with 'typeset -a'

There is a bug in print_scan() function that may cause ksh to crash
while listing indexed arrays. The crash happens in nv_search() when
called from print_scan().

This applies a fix from Siteshwar Vashist:
https://www.mail-archive.com/ast-developers@lists.research.att.com/msg01944.html

src/cmd/ksh93/bltins/typeset.c:
- Call nv_scan() without the NV_IARRAY flag, even for a null scan.

src/cmd/ksh93/tests/arrays.sh:
- Add regression test for 'typeset -a' crash and check output.
This commit is contained in:
Martijn Dekker 2020-07-09 16:02:15 +01:00
parent a8f6d6b842
commit 5e7d335f2f
3 changed files with 12 additions and 1 deletions

2
NEWS
View file

@ -7,6 +7,8 @@ Any uppercase BUG_* names are modernish shell bug IDs.
- Fixed a crash on syntax error when sourcing/dotting multiple files.
- Fixed a crash when listing indexed arrays.
2020-07-07:
- Four of the date formats accepted by 'printf %()T' have had their