On Sun, 4 Oct 2009, Cristian Ionescu-Idbohrn wrote:

> 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.

But not sufficient.  Attached patch might be though.


Cheers,

-- 
Cristian
--- ash.c.orig	2009-10-03 19:03:05.000000000 +0200
+++ ash.c	2009-10-04 14:35:25.000000000 +0200
@@ -11275,6 +11275,8 @@ parsesub: {
  badsub:
 			raise_error_syntax("bad substitution");
 		}
+		if (c != '}' && subtype == VSLENGTH)
+			goto badsub;
 
 		STPUTC('=', out);
 		flags = 0;
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to