Anonymous | Login | Signup for a new account | 11-10-2008 11:00 PST |
Main | My View | View Issues | Change Log | Docs |
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 | ||||||||
|
Copyright © 2000 - 2006 Mantis Group |