[syslinux:elflink] readconfig: Don't display "(null)" labels when hitting TAB

syslinux-bot for Matt Fleming matt.fleming at intel.com
Thu Mar 7 04:54:05 PST 2013

Commit-ID:  557ad5544fbaa893936d31e44038c3570030a798
Gitweb:     http://www.syslinux.org/commit/557ad5544fbaa893936d31e44038c3570030a798
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Thu, 28 Feb 2013 15:07:19 +0000
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Thu, 7 Mar 2013 12:17:55 +0000

readconfig: Don't display "(null)" labels when hitting TAB

It is entirely legitimate for a menu entry to have a NULL label or
displayname. Since these entries are not used for execution, skip
displaying them in print_labels() when hitting the TAB key.

Reported-by: Bernd Blaauw <bblaauw at home.nl>
Signed-off-by: Matt Fleming <matt.fleming at intel.com>

 com32/elflink/ldlinux/readconfig.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c
index 036a1df..9d50c2f 100644
--- a/com32/elflink/ldlinux/readconfig.c
+++ b/com32/elflink/ldlinux/readconfig.c
@@ -473,6 +473,9 @@ void print_labels(const char *prefix, size_t len)
     for (me = all_entries; me; me = me->next ) {
+	if (!me->label)
+	    continue;
 	if (!strncmp(prefix, me->label, len))
 	    printf(" %s", me->label);

More information about the Syslinux-commits mailing list