mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix crash due to double free() when sourcing multiple files
There is a bug in sh_eval() that may cause ksh to crash due to a double free() after sourcing multiple files with '.' or 'source' if a longjmp is triggered, e.g. by a syntax error. This applies a fix from Siteshwar Vashist: https://www.mail-archive.com/ast-developers@lists.research.att.com/msg01943.html src/cmd/ksh93/sh/xec.c: sh_eval(): - Zero file descriptor io_save after closing it. This prevents a double free() after returning from a longjmp. src/cmd/ksh93/tests/basic.sh: - Add reproducer as regression test.
This commit is contained in:
parent
ae92cd897e
commit
a8f6d6b842
4 changed files with 38 additions and 1 deletions
4
NEWS
4
NEWS
|
@ -3,6 +3,10 @@ For full details, see the git log at: https://github.com/ksh93/ksh
|
|||
|
||||
Any uppercase BUG_* names are modernish shell bug IDs.
|
||||
|
||||
2020-07-09:
|
||||
|
||||
- Fixed a crash on syntax error when sourcing/dotting multiple files.
|
||||
|
||||
2020-07-07:
|
||||
|
||||
- Four of the date formats accepted by 'printf %()T' have had their
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue