From e527bd22dbda697d09d4dff8786c6290d79d577a Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Wed, 4 Mar 2026 15:04:12 +0000 Subject: ash: fix here strings causing segfault in function invocation The size of the NFROMSTR struct wasn't initialised in the nodesize array, so we got: $ ./busybox sh $ f() { cat <<< hello; } $ f Segmentation fault (core dumped) ./busybox sh Signed-off-by: Ron Yorston Signed-off-by: Denys Vlasenko --- shell/ash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/shell/ash.c b/shell/ash.c index 62f185354..fb887f31b 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -9300,6 +9300,7 @@ static const uint8_t nodesize[N_NUMBER] ALIGN1 = { #endif [NCLOBBER ] = SHELL_ALIGN(sizeof(struct nfile)), [NFROM ] = SHELL_ALIGN(sizeof(struct nfile)), + [NFROMSTR ] = SHELL_ALIGN(sizeof(struct nfile)), [NFROMTO ] = SHELL_ALIGN(sizeof(struct nfile)), [NAPPEND ] = SHELL_ALIGN(sizeof(struct nfile)), [NTOFD ] = SHELL_ALIGN(sizeof(struct ndup)), -- cgit v1.2.3-55-g6feb