diff options
-rw-r--r-- | editors/sed.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editors/sed.c b/editors/sed.c index c97092a5c..ea99dd856 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -410,7 +410,9 @@ static char *parse_cmd_args(sed_cmd_t *sed_cmd, char *cmdstr) | |||
410 | if ((sed_cmd->end_line || sed_cmd->end_match) && sed_cmd->cmd != 'c') | 410 | if ((sed_cmd->end_line || sed_cmd->end_match) && sed_cmd->cmd != 'c') |
411 | bb_error_msg_and_die | 411 | bb_error_msg_and_die |
412 | ("only a beginning address can be specified for edit commands"); | 412 | ("only a beginning address can be specified for edit commands"); |
413 | while(isspace(*cmdstr)) cmdstr++; | 413 | if (*cmdstr != '\n') /* should not happen */ |
414 | bb_error_msg_and_die("A/I/C backslash not followed by NL?"); | ||
415 | cmdstr++; /* skip over the NL following the backslash */ | ||
414 | sed_cmd->string = bb_xstrdup(cmdstr); | 416 | sed_cmd->string = bb_xstrdup(cmdstr); |
415 | parse_escapes(sed_cmd->string,sed_cmd->string,strlen(cmdstr),0,0); | 417 | parse_escapes(sed_cmd->string,sed_cmd->string,strlen(cmdstr),0,0); |
416 | cmdstr += strlen(cmdstr); | 418 | cmdstr += strlen(cmdstr); |