BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000826 [BusyBox] Other minor always 04-11-06 01:38 06-28-06 06:51
Reporter lionel View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version 1.1.x
Summary 0000826: 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@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)
Additional Information This x command is used, for example, in the following sed script (used to number lines):
http://www.delorie.com/gnu/docs/sed/sed_20.html [^]
Attached Files  sed_x_command_on_empty_hold.patch [^] (595 bytes) 04-11-06 01:38

- Relationships

- Notes
(0001469)
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
06-28-06 06:51 landley Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker