[BusyBox] sed bug & patch
Jim Gleason
jimg at lineo.com
Fri Jul 13 14:42:53 UTC 2001
All,
I have discovered a bug in the busybox sed code (see bug description
below). I have also attached a patch for it. Please look it over, try
iy out, and someone commit it.
Thanks,
Jim Gleason
--- Bug Description ---
Given the following file (named junk):
this
is
fun
don't
you
think
so
And given the following command:
sed -e "s/this/THIS/g" -e "s/^is$/IS/g" junk
I get the following result:
THIS
this
IS
fun
don't
you
think
so
Notice the dupliced line "this" with the modified line "THIS" both in
the output.
As it turns out, the sed functionality (process_file(), case -s)
neglected to incrementally track the altered data in two cases (see the
patch).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox.sed.patch
Type: application/octet-stream
Size: 785 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20010713/e5bd7e32/attachment.obj
More information about the busybox
mailing list