2009-12-27 Vladimir Serbinenko <phcoder@gmail.com>

* kern/parser.c (grub_parser_split_cmdline): Don't dereference NULL.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2009-12-28 01:02:21 +01:00
parent 9c8739a456
commit c181849b95
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2009-12-27 Vladimir Serbinenko <phcoder@gmail.com>
* kern/parser.c (grub_parser_split_cmdline): Don't dereference NULL.
2009-12-27 Vladimir Serbinenko <phcoder@gmail.com>
* normal/menu_text.c (grub_print_message_indented): Prevent

View file

@ -145,13 +145,16 @@ grub_parser_split_cmdline (const char *cmdline, grub_reader_getline_t getline,
*argc = 0;
do
{
if (! *rd)
if (! rd || !*rd)
{
if (getline)
getline (&rd, 1);
else break;
}
if (!rd)
break;
for (; *rd; rd++)
{
grub_parser_state_t newstate;