[BusyBox 0000826]: sed crashes when 'x' command run on an empty hold space
bugs at busybox.net
bugs at busybox.net
Wed Jun 28 13:51:32 UTC 2006
The following issue has been CLOSED
======================================================================
http://busybox.net/bugs/view.php?id=826
======================================================================
Reported By: lionel
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 826
Category: Other
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Resolution: open
Fixed in Version:
======================================================================
Date Submitted: 04-11-2006 01:38 PDT
Last Modified: 06-28-2006 06:51 PDT
======================================================================
Summary: sed crashes when 'x' command run on an empty hold
space
Description:
When executing the x command while the current hold space is empty, sed
crashes.
To reproduce, just type the following command line:
[root at localhost busybox-1.1.1_new]# (echo;echo) | ./busybox sed -e x
Segmentation fault
On GNU sed:
bash-3.00$ (echo;echo) | sed -e x
This is due to a NULL pointer being exchanged between hold and pattern
space and can be sorted out by allocating an empty string in the pattern
space when x is issued and the hold space is empty.
I attach a short patch for this to work (this patch works for
busybox-1.1.0 and busybox-1.1.1)
======================================================================
----------------------------------------------------------------------
landley - 06-28-06 06:51
----------------------------------------------------------------------
svn 15539
Issue History
Date Modified Username Field Change
======================================================================
04-11-06 01:38 lionel New Issue
04-11-06 01:38 lionel Status new => assigned
04-11-06 01:38 lionel Assigned To => BusyBox
04-11-06 01:38 lionel File Added: sed_x_command_on_empty_hold.patch
06-28-06 06:51 landley Status assigned => closed
06-28-06 06:51 landley Note Added: 0001469
======================================================================
More information about the busybox-cvs
mailing list