* editors/sed.c (parse_edit_command): Require a newline after the backslash after an edit command. * testsuite/sed/sed-requires-newline-after-edit-command: New.
No binary (build failed)
—
(log yok)
| @@ -322,7 +322,7 @@ static int parse_edit_cmd(struct sed_cmd *sed_cmd, const char *editstr) | |
| * | |
| */ | |
| - | if (editstr[1] != '\\' && (editstr[2] != '\n' || editstr[2] != '\r')) |
| + | if (editstr[1] != '\\' || (editstr[2] != '\n' && editstr[2] != '\r')) |
| error_msg_and_die("bad format in edit expression"); | |
| /* store the edit line text */ | |
| @@ -0,0 +1 @@ | |
| + | ! busybox sed -e 'i\foo' </dev/null |