ash/stty usage
Denys Vlasenko
vda.linux at googlemail.com
Sat Jun 14 06:03:50 UTC 2008
On Saturday 14 June 2008 06:59, Denys Vlasenko wrote:
> On Saturday 14 June 2008 06:47, Denys Vlasenko wrote:
> > Smaller testcase:
> >
> > a='a<b'
> > b='\033#'
> > r=${a//</$b}
> > echo $r
> >
> > Results:
> >
> > # sh zz
> > a\033#b
> > # ./busybox ash zz
> > aK#b
> >
> > '<' is not special. Replacing 'b' in 'abc' would work the same.
> > The culprit is '\' in replacement.
>
> Bug is here:
>
> c = (c << 3) + atoi(arg);
>
> Should be:
>
> c = (c << 3) + (*arg - '0');
>
> Can you confirm?
Scratch that, it's wrong. Try this one.
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a.patch
Type: text/x-diff
Size: 2170 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20080614/4f1c8997/attachment.bin
More information about the busybox
mailing list