diff -u elilo-3.4.orig/choosers/simple.c elilo-3.4/choosers/simple.c --- elilo-3.4.orig/choosers/simple.c 2003-08-20 11:13:11.000000000 -0700 +++ elilo-3.4/choosers/simple.c 2004-09-14 15:03:51.000000000 -0700 @@ -303,14 +303,14 @@ * if no match is found, the args and initrd arguments may * still be modified by global options in the config file. */ - ret = find_label(argv[index], kname, args, initrd_name); + ret = find_label((index < argc) ? argv[index] : NULL, kname, args, initrd_name); /* * not found, so assume first argument is kernel name and * not label name */ if (ret == -1) { - if (argv[index]) + if ((index < argc) && argv[index]) StrCpy(kname, argv[index]); else StrCpy(kname, elilo_opt.default_kernel);