Bug in busybox sed - this one is real

Rich Felker dalias at aerifal.cx
Wed Jun 6 00:24:13 UTC 2012


On Mon, Jun 04, 2012 at 02:56:15PM +0200, Denys Vlasenko wrote:
> On Sun, Jun 3, 2012 at 3:54 PM, Rich Felker <dalias at aerifal.cx> wrote:
> > Ping. Anybody looked at this? I filed it as bug # 5246.
> 
> fixed in git:
> 
> commit 21f6fbf545e7fa58f0eaa444001a9d25bc37c4eb
> Author: Denys Vlasenko <vda.linux at googlemail.com>
> Date:   Mon Jun 4 14:44:47 2012 +0200
> 
>     sed: fix zero chars match/replace

The fix broke it worse:

$ sed 's/\(["`$\\]\)/\\\1/g' << "EOF"
{\"\1\"
EOF
{\\\"\\1\\\"
$ busybox sed 's/\(["`$\\]\)/\\\1/g' << "EOF"
{\"\1\"
EOF
{\\1\\

Previous version of busybox sed handled this case fine.

Rich


More information about the busybox mailing list