]> git.proxmox.com Git - grub2.git/commitdiff
grub_script_lexer_yywrap: Update len synchronously with line.
authorVladimir Serbinenko <phcoder@gmail.com>
Tue, 20 Jan 2015 11:53:20 +0000 (12:53 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Wed, 21 Jan 2015 16:38:01 +0000 (17:38 +0100)
ChangeLog
grub-core/script/lexer.c

index 326f62129457447386dfb4c26d8955a8fcd5c5d2..80ef35c626291da4cc0a83c7bcba118411582041 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-20  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/script/lexer.c (grub_script_lexer_yywrap): Update len
+       synchronously with line.
+
 2015-01-20  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Replace explicit sizeof divisions by ARRAY_SIZE.
index 128d23822683f6ba95e0cb06d31a7234023fd216..89cf67706509d0dd0920273cd00868971433583d 100644 (file)
@@ -164,6 +164,7 @@ grub_script_lexer_yywrap (struct grub_parser_param *parserstate,
     {
       grub_free (line);
       line = grub_strdup ("\n");
+      len = 1;
     }
   else if (len && line[len - 1] != '\n')
     {