From 1432471a759dc0cbc80c53766894dba45e6da887 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 29 Apr 2019 13:45:32 +0900 Subject: Disallow also CR in here-doc identifier * parse.y (heredoc_identifier): CR in here-document identifier might or might not result in a syntax error, by the EOL code. make a syntax error regardless of the EOL code. --- parse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index fddd02a9b3..3c52f5b426 100644 --- a/parse.y +++ b/parse.y @@ -6820,7 +6820,7 @@ heredoc_identifier(struct parser_params *p) tokadd(p, func); term = c; while ((c = nextc(p)) != -1 && c != term) { - if (c == '\n') goto unterminated; + if (c == '\r' || c == '\n') goto unterminated; if (tokadd_mbchar(p, c) == -1) return 0; } if (c == -1) { -- cgit v1.2.3