]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
authorphcoder <phcoder@localhost>
Mon, 15 Jun 2009 21:06:58 +0000 (21:06 +0000)
committerphcoder <phcoder@localhost>
Mon, 15 Jun 2009 21:06:58 +0000 (21:06 +0000)
Fix handling of string like \"hello\" and "a
b"

* script/sh/lexer.c
(grub_script_yylex): fix parsing of quoting, escaping and newline

script/sh/lexer.c

index 47939c96d2e6a2d00b1c1b7bd5f408418684382a..99bd3baac88a72f356f7b3fa398ecaa2fcabaddb 100644 (file)
@@ -280,7 +280,9 @@ grub_script_yylex (union YYSTYPE *yylval, struct grub_parser_param *parsestate)
                 when a special token was found.  It will be recognized
                 next time when this function is called.  */
              if (newstate == GRUB_PARSER_STATE_TEXT
-                 && state->state != GRUB_PARSER_STATE_ESC)
+                 && state->state != GRUB_PARSER_STATE_ESC
+                 && state->state != GRUB_PARSER_STATE_QUOTE
+                 && state->state != GRUB_PARSER_STATE_DQUOTE)
                {
                  int breakout = 0;