[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] fix read uninitialized at exec_builtin:orig_job_control
From: |
Chet Ramey |
Subject: |
Re: [PATCH] fix read uninitialized at exec_builtin:orig_job_control |
Date: |
Wed, 17 Aug 2022 09:45:12 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 |
On 8/16/22 1:58 PM, Xiami wrote:
The following script will likely failed to echo "Failed to exec" in
non-interactive mode:
#ls -l /proc/$$/fd
shopt -s execfail
exec notexistexecutable
echo >&2 "Failed to exec"
#ls -l /proc/$$/fd
exec_builtin will `goto failed_exec` after `search_for_command(args[0], 1)`
returns NULL, before `orig_job_control = job_control`, causing read
uninitialized orig_job_control in failed_exec code.
Thanks for the report.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/