]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
authorphcoder <phcoder@localhost>
Sat, 25 Jul 2009 15:13:07 +0000 (15:13 +0000)
committerphcoder <phcoder@localhost>
Sat, 25 Jul 2009 15:13:07 +0000 (15:13 +0000)
* kern/parser.c (grub_parser_execute): Fix a bug causing truncated
entries on failed boot.

ChangeLog
kern/parser.c

index bffd6c16c3b094f778436d705f0bfa83076805fd..9986929d331a39fbbcf1945577e5774fc681badd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
+       entries on failed boot.
+
 2009-07-25  Felix Zielcke  <fzielcke@z-51.de>
 
        * kern/file.c (grub_file_open): Fix an error check.
index 5e56ede91d7778f165859a03c2e55aa6e94361b8..db59af056bcd6cf22e63b4c5ee51fb2b74fbc651 100644 (file)
@@ -245,10 +245,12 @@ grub_parser_execute (char *source)
 
       p = grub_strchr (source, '\n');
       if (p)
-       *(p++) = 0;
+       *p = 0;
 
       *line = grub_strdup (source);
-      source = p;
+      if (p)
+       *p = '\n';
+      source = p ? p + 1 : 0;
       return 0;
     }