[syslinux] [menu] Bug: 'cm' is used before it is initialized

CKSoon cksoon79 at yahoo.com
Mon Aug 17 01:16:12 PDT 2009


Hi Peter,

I've traced the problem back to a change on 2008-02-20 "simple menu: first cut at working submenus". The cm initialization was moved down but the checking of !cm->nentries was not moved.

~~~~~~~ 2008-02-20 "simple menu: first cut at working submenus" ~~~~~~

@@ -1024,7 +1059,6 @@ int menu_main(int argc, char *argv[])
   }
 
   parse_configs(argv+1);
-  cm = start_menu;
 
   /* Some postprocessing for all menus */
   for (m = menu_list; m; m = m->next) {
@@ -1043,6 +1077,7 @@ int menu_main(int argc, char *argv[])
     return 1;                  /* Error! */
   }
 
+  cm = start_menu;
   for(;;) {
     cmdline = run_menu();


- Keng Soon -

> 
> Could you send an actual configuration file?
> 
> I will definitely look into this, but it really helps if I
> have a test case.
> 
>     -hpa
> 
> 
> -- 
> H. Peter Anvin, Intel Open Source Technology Center
> I work for Intel.  I don't speak on their behalf.
> 
> 


      




More information about the Syslinux mailing list