Hi, I'm seeing a problem on my system where the PXELINUX (and also the ISOLINUX) keep on prompting me the "Initial menu has no LABEL entries!" message, when vesamenu.c32 or menu.c32 is executed. After some investigation, I found that the global cm used in menu_main before it is initialized, and hence it carries a NULL value. I manage to get my system to display the menu after I bypass the code checking !cm->nentries (shown below). Note that not all system will see the same problem because it depends on what the content of cm->nentries when cm is NULL. I'm seeing the problem on syslinux 3.82 and I believe the problem exists in some previous versions. I've tried syslinux 3.54 which doesn't have the following code and it manage to show the menu correctly. Sample of the menu configuration file I used: http://clonezilla.org/. Code: menu_main(), .\com32\menu\menumain.c ------------------------------------------ . . . ? if ( !cm->nentries ) { <--------------------------- cm is NULL ??? fputs("Initial menu has no LABEL entries!\n", stdout); ??? return 1;??? ??? ??? /* Error! */ ? } ? cm = start_menu; <---------------------- cm is initialized here . . .
H. Peter Anvin
2009-Aug-17 06:46 UTC
[syslinux] [menu] Bug: 'cm' is used before it is initialized
On 08/16/2009 06:26 PM, CKSoon wrote:> > I'm seeing the problem on syslinux 3.82 and I believe the problem exists in some previous versions. I've tried syslinux 3.54 which doesn't have the following code and it manage to show the menu correctly. Sample of the menu configuration file I used: http://clonezilla.org/. >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.