[Bug 8961] New: Bash Compatible sub string of variable when evaluating negative value causes seg fault
bugzilla at busybox.net
bugzilla at busybox.net
Thu May 26 16:20:23 UTC 2016
https://bugs.busybox.net/show_bug.cgi?id=8961
Bug ID: 8961
Summary: Bash Compatible sub string of variable when evaluating
negative value causes seg fault
Product: Busybox
Version: 1.24.x
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: vapier at gentoo.org
CC: busybox-cvs at busybox.net
Target Milestone: ---
When referencing a sub-string of a variable, using a negative value stored
in another variable, the shell will seg-fault.
Steps to reproduce:
/ # s=abcdefg
/ # n=2
/ # echo ${s:$n}
cdefg
/ # n=-2
/ # echo ${s:$n}
Segmentation fault
Expected behavior:
/ # s=abcdefg
/ # n=2
/ # echo ${s:$n}
cdefg
/ # n=-2
/ # echo ${s:$n}
fg
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list