aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2026-03-04 14:27:16 +0000
committerRon Yorston <rmy@pobox.com>2026-03-04 14:27:16 +0000
commitb8b19b18ad8f189e1a6f52043dabe8d38d19b883 (patch)
treecf8a1808b9dad5cc102d1aa2e4121feb048c0fd4 /shell
parent35e590816a844e3ccc707c841b756e83987d09eb (diff)
downloadbusybox-w32-b8b19b18ad8f189e1a6f52043dabe8d38d19b883.tar.gz
busybox-w32-b8b19b18ad8f189e1a6f52043dabe8d38d19b883.tar.bz2
busybox-w32-b8b19b18ad8f189e1a6f52043dabe8d38d19b883.zip
ash: fix here strings causing segfault in subshells
A here string in a subshell or function invocation caused a SEGV. This was due to an upstream bug: the size of the NFROMSTR struct wasn't initialised in the nodesize array. (GitHub issue #567)
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 05a43ccad..7647a42cf 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -10303,6 +10303,9 @@ static const uint8_t nodesize[N_NUMBER] ALIGN1 = {
10303#endif 10303#endif
10304 [NCLOBBER ] = SHELL_ALIGN(sizeof(struct nfile)), 10304 [NCLOBBER ] = SHELL_ALIGN(sizeof(struct nfile)),
10305 [NFROM ] = SHELL_ALIGN(sizeof(struct nfile)), 10305 [NFROM ] = SHELL_ALIGN(sizeof(struct nfile)),
10306#if ENABLE_PLATFORM_MINGW32
10307 [NFROMSTR ] = SHELL_ALIGN(sizeof(struct nfile)),
10308#endif
10306 [NFROMTO ] = SHELL_ALIGN(sizeof(struct nfile)), 10309 [NFROMTO ] = SHELL_ALIGN(sizeof(struct nfile)),
10307 [NAPPEND ] = SHELL_ALIGN(sizeof(struct nfile)), 10310 [NAPPEND ] = SHELL_ALIGN(sizeof(struct nfile)),
10308 [NTOFD ] = SHELL_ALIGN(sizeof(struct ndup)), 10311 [NTOFD ] = SHELL_ALIGN(sizeof(struct ndup)),