mirror of
https://github.com/sheumann/hush.git
synced 2024-12-28 07:30:23 +00:00
Fix http://bugs.busybox.net/view.php?id=826 in which "(echo; echo) | sed x"
crashes because the empty state of the hold space is NULL but the empty state of the pattern space is "".
This commit is contained in:
parent
cc826d74e4
commit
ea7c18514b
@ -1054,7 +1054,7 @@ restart:
|
||||
case 'x': /* Exchange hold and pattern space */
|
||||
{
|
||||
char *tmp = pattern_space;
|
||||
pattern_space = bbg.hold_space;
|
||||
pattern_space = bbg.hold_space ? : xzalloc(1);
|
||||
no_newline=0;
|
||||
bbg.hold_space = tmp;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user