[BusyBox] bug in sed for busybox 0.52
Erik Andersen
andersen at lineo.com
Tue Jul 31 10:01:41 UTC 2001
On Fri Jul 13, 2001 at 03:20:43PM -0600, Jim Gleason wrote:
> Yes,
>
> I just barely submitted a patch for this bug to the group. In the
> substition processing portion of the process_file() function in sed.c a
> variable "altered" is being used to track the line being worked on. In two
> cases it is being set explicitly "=" instead of being incremented if it is
> altered "+=". My patch fixes this.
>
> However, my patch does not fix yet another bug in the same code (bigger and
> badder in my opinion). If the substitution commands are to affect the same
> line (first one and then another), the code will fail miserably. First,
> you will get the first substitution results output, and then the second
> which relied on the second will fail. Next, if the original line would
> have been altered by yet another substitution, we will get another altered
> copy of the line output. The code needs modified to pass around a modified
> string and then output it if it has not been totaly removed/deleted. I
> don't have time to make such a modification now, but maybe sometime next
> week.
>
> Jim Gleason
Jim, do you have a testcase yo can provide that demonstrates this
bigger and badder bug, so I can look into it?
-Erik
--
Erik B. Andersen email: andersen at lineo.com
--This message was written using 73% post-consumer electrons--
More information about the busybox
mailing list