diff options
| author | Ron Yorston <rmy@pobox.com> | 2026-03-04 15:04:12 +0000 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2026-03-09 15:23:59 +0100 |
| commit | e527bd22dbda697d09d4dff8786c6290d79d577a (patch) | |
| tree | 3b4fd60e1b3bba4e0d98129b1b3f1aa86bc25c25 /shell | |
| parent | ea01f254b4e0dc2f59db4cba9dd4fa98e9f5b2e5 (diff) | |
| download | busybox-w32-busybox.tar.gz busybox-w32-busybox.tar.bz2 busybox-w32-busybox.zip | |
ash: fix here strings causing segfault in function invocationbusybox
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 <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 = { | |||
| 9300 | #endif | 9300 | #endif |
| 9301 | [NCLOBBER ] = SHELL_ALIGN(sizeof(struct nfile)), | 9301 | [NCLOBBER ] = SHELL_ALIGN(sizeof(struct nfile)), |
| 9302 | [NFROM ] = SHELL_ALIGN(sizeof(struct nfile)), | 9302 | [NFROM ] = SHELL_ALIGN(sizeof(struct nfile)), |
| 9303 | [NFROMSTR ] = SHELL_ALIGN(sizeof(struct nfile)), | ||
| 9303 | [NFROMTO ] = SHELL_ALIGN(sizeof(struct nfile)), | 9304 | [NFROMTO ] = SHELL_ALIGN(sizeof(struct nfile)), |
| 9304 | [NAPPEND ] = SHELL_ALIGN(sizeof(struct nfile)), | 9305 | [NAPPEND ] = SHELL_ALIGN(sizeof(struct nfile)), |
| 9305 | [NTOFD ] = SHELL_ALIGN(sizeof(struct ndup)), | 9306 | [NTOFD ] = SHELL_ALIGN(sizeof(struct ndup)), |
