← Commit list

d21735de2

Matt Kraai
Matt Kraai
2002-01-02
FAILED Duration: 385s

Subject

* 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.

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/sed.c+1 -1
@@ -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 */
testsuite/sed/sed-requires-newline-after-edit-command+1 -0
@@ -0,0 +1 @@
+! busybox sed -e 'i\foo' </dev/null