[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox-cvs
Subject:    [Bug 8961] New: Bash Compatible sub string of variable when evaluating negative value causes seg fau
From:       bugzilla () busybox ! net
Date:       2016-05-26 16:20:23
Message-ID: bug-8961-161 () https ! bugs ! busybox ! net/
[Download RAW message or body]

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@busybox.net
          Reporter: vapier@gentoo.org
                CC: busybox-cvs@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.
_______________________________________________
busybox-cvs mailing list
busybox-cvs@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic