| Summary: | ash: segmentation fault with substring at negative offset | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Ronald Wahl <ronald.wahl> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | busybox-cvs, vapier |
| Priority: | P5 | ||
| Version: | 1.22.x | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
*** Bug 8961 has been marked as a duplicate of this bug. *** Fixed sometime ago |
The following command line will crash ash: a=;echo ${a:$((0-8192))} It looks like that there is no sanity check for negative offsets. Furthermore bash looks at the string from behind when using negative offsets. This would be a cool feature. Currently I have to fiddle around to achieve this and the above segmentation fault was the fall-out of my testing. I tested with 1.21.1 and 1.22.1 both show the issue. Others not checked.