aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2026-05-06 13:57:04 +0100
committerRon Yorston <rmy@pobox.com>2026-05-06 13:57:04 +0100
commit169694ebdba292f6533f78aeea678bfbb907396c (patch)
tree4ac3721afe009fcb4a428f3b8fdf0376519a108e /scripts
parent9351ea0819bfb05da32389d93964acc56b076c8d (diff)
downloadbusybox-w32-169694ebdba292f6533f78aeea678bfbb907396c.tar.gz
busybox-w32-169694ebdba292f6533f78aeea678bfbb907396c.tar.bz2
busybox-w32-169694ebdba292f6533f78aeea678bfbb907396c.zip
ash: further fixes to merge of upstream changesFRP-6075-g169694ebd
Commits e23652908 and 686a0803f (ash: fix execution of applets via Unix-style path) were necessary following a major revision of the shell upstream. Another problem was found: $ sh $ PATH="/usr/bin;$PATH" exec non-existent resulted in a segfault. This happened because during a PATH search tryexec() modified argv[0] when it detected a Unix-style path (in this case '/usr/bin/non-existent') but failed to restore it if the execution failed. There were other issues: - The logic of the new code failed to match the original: the test for a Unix-style path should only have happened if an attempt to execute the full path had already failed. - The test for a script running an interpreter which is an applet also modified argv. If the execution failed argv should have been restored to its original state. - During a PATH search the 'path' pointer walked through the elements of the path. This pointer was also used to determine if an applet was overridden by an executable. This is wrong: the full PATH variable should have been used. The code around tryexec()/shellexec() has been rewritten to take these issues into account. Adds 32-48 bytes. (GitHub issue #584)
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions