On Sun, 4 Oct 2009, Denys Vlasenko wrote:
> On Saturday 03 October 2009 19:11, Cristian Ionescu-Idbohrn wrote:
> >
> > Would the attached patch be an apprpriate bugfix for the above?
>
> No, it breaks valid constructs like this one:
>
> echo "0. \$\$='$$', size \${#\$}=${#$}" >&2
Another attempt (attached) to fix this bug.
Cheers,
--
Cristian
--- ash.c.orig 2009-10-03 19:03:05.000000000 +0200
+++ ash.c 2009-10-04 13:11:37.000000000 +0200
@@ -11271,6 +11271,8 @@
} else if (is_special(c)) {
USTPUTC(c, out);
c = pgetc();
+ if (c != '}' && subtype == VSLENGTH)
+ goto badsub;
} else {
badsub:
raise_error_syntax("bad substitution");
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox