From 734740a5ed52d236f3893cc738fb09c7203a5138 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Wed, 8 Jun 2022 20:48:42 -0700 Subject: 50341: disallow here-document markers containing newline --- Src/parse.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Src/parse.c') diff --git a/Src/parse.c b/Src/parse.c index d612b7e17..5054e59d5 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -2248,6 +2248,9 @@ par_redir(int *rp, char *idstring) struct heredocs **hd; int htype = type; + if (strchr(tokstr, '\n')) + YYERROR(ecused); + /* * Add two here for the string to remember the HERE * terminator in raw and munged form. -- cgit 1.4.1