projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc826d7
)
Fix http://bugs.busybox.net/view.php?id=826 in which "(echo; echo) | sed x"
author
Rob Landley
<rob@landley.net>
Wed, 28 Jun 2006 13:50:59 +0000
(13:50 -0000)
committer
Rob Landley
<rob@landley.net>
Wed, 28 Jun 2006 13:50:59 +0000
(13:50 -0000)
crashes because the empty state of the hold space is NULL but the empty
state of the pattern space is "".
editors/sed.c
patch
|
blob
|
history
diff --git
a/editors/sed.c
b/editors/sed.c
index 219a44008bc982cd141607ca2692baaeb0f611b2..ed584e5dfeb76ef01359932d624520756980099e 100644
(file)
--- a/
editors/sed.c
+++ b/
editors/sed.c
@@
-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;