Re: [PATCH] Avoid crash on empty menu

2007-11-10 Thread Robert Millan
On Sat, Nov 10, 2007 at 04:27:28PM +0100, Marco Gerards wrote: > > > > 2007-11-10 Christian Franke <[EMAIL PROTECTED]> > > > > * normal/menu.c (run_menu): Check for empty menu to avoid crash. > > (grub_menu_run): Likewise. > > This looks ok to me. We can apply this now, it's just a few

Re: [PATCH] Avoid crash on empty menu

2007-11-10 Thread Marco Gerards
Christian Franke <[EMAIL PROTECTED]> writes: > Marco Gerards wrote: >> >>> + e = get_entry (menu, boot_entry); >>> + if (! e) >>> + continue; /* menu is empty */ >>> >> >> Please use proper interpunctions for comments. >> >> > > Fixed. > > Christian > > 2007-11-10 Christian Franke <[

Re: [PATCH] Avoid crash on empty menu

2007-11-10 Thread Christian Franke
Marco Gerards wrote: + e = get_entry (menu, boot_entry); + if (! e) + continue; /* menu is empty */ Please use proper interpunctions for comments. Fixed. Christian 2007-11-10 Christian Franke <[EMAIL PROTECTED]> * normal/menu.c (run_menu): Check for emp

Re: [PATCH] Avoid crash on empty menu

2007-11-09 Thread Marco Gerards
Christian Franke <[EMAIL PROTECTED]> writes: > If grub.cfg does not contain any valid menuentry statements, an empty > menu is opened. > grub-emu crashes (and real grub behaves "interesting") if the first > entry is selected. > > The attached patch adds the missing nullptr checks. > > An alternati

[PATCH] Avoid crash on empty menu

2007-11-07 Thread Christian Franke
If grub.cfg does not contain any valid menuentry statements, an empty menu is opened. grub-emu crashes (and real grub behaves "interesting") if the first entry is selected. The attached patch adds the missing nullptr checks. An alternative would be to treat an empty menu as a syntax error in