]> git.proxmox.com Git - grub2.git/commitdiff
fix off-by-one error in menuentry cmd
authorBVK Chaitanya <bvk.groups@gmail.com>
Thu, 11 Feb 2010 13:19:57 +0000 (18:49 +0530)
committerBVK Chaitanya <bvk.groups@gmail.com>
Thu, 11 Feb 2010 13:19:57 +0000 (18:49 +0530)
ChangeLog.lexer-rewrite
script/lexer.c

index 9b2ab9e2f178381f083a20ef937ce5c4ae31ffe4..24d009d14de84696d281dab509596bed34a1c191 100644 (file)
@@ -1,3 +1,8 @@
+2010-02-10  BVK Chaitanya  <bvk.groups@gmail.com>
+
+       * script/lexer.c (grub_script_lexer_record_stop): Fix off-by-one
+       bug.
+
 2010-01-25  BVK Chaitanya  <bvk.groups@gmail.com>
 
        * script/yylex.l: Accept parenthesis as part of word.
index caefdb7a778a83665789b1be043b88865c9197fd..42a570348081544f196e1015aeae843a5e38c34f 100644 (file)
@@ -76,7 +76,7 @@ grub_script_lexer_record_stop (struct grub_parser_param *parser)
     while (*end && grub_isspace (*end)) end--;
     if (*end == '}') end--;
     while (*end && grub_isspace (*end)) end--;
-    *end = '\0';
+    end[1] = '\0';
 
     return start;
   }