From: Glenn L McGrath Date: Mon, 15 Sep 2003 05:42:05 +0000 (-0000) Subject: Fix for the sed-append-next-line test X-Git-Tag: 1_00_pre4~182 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=73116311e561212729debc1483c414aa184cc591;p=oweals%2Fbusybox.git Fix for the sed-append-next-line test --- diff --git a/editors/sed.c b/editors/sed.c index b73d660ed..00ed20892 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -1001,6 +1001,11 @@ static void process_file(FILE * file) strcat(pattern_space, next_line); next_line = bb_get_chomped_line_from_file(file); linenum++; + } else { + /* Jump to end of script and exist */ + deleted = 1; + free(next_line); + next_line = NULL; } break; case 't':