Re: [PATCH] ash: fix here strings causing segfault in function invocation
Denys Vlasenko via busybox <[email protected]>
| Newsgroups | gmane.linux.busybox |
|---|---|
| Message-ID | <CAK1hOcNPGEoOAnqMaK8VBiPY5ey7xs3LUC5CdRoF0i6AFGLSGA@mail.gmail.com> |
Applied, thank you. On Wed, Mar 4, 2026 at 4:04 PM Ron Yorston via busybox <[email protected]> wrote: > > 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 <[email protected]> > --- > shell/ash.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/shell/ash.c b/shell/ash.c > index 19623a9a0..1f5b467ec 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)), > -- > 2.53.0 > > _______________________________________________ > busybox mailing list > [email protected] > https://lists.busybox.net/mailman/listinfo/busybox _______________________________________________ busybox mailing list [email protected] https://lists.busybox.net/mailman/listinfo/busybox