prevent buffer underflows with empty lines
authorMike Frysinger <vapier@gentoo.org>
Sat, 30 Dec 2006 19:30:20 +0000 (19:30 -0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 30 Dec 2006 19:30:20 +0000 (19:30 -0000)
scripts/kconfig/conf.c

index a95ba93e24a18e886bc27e3c915fa5c42d4f0467..ca722b05dce4b2b490412ca8d90de858bfb82b6d 100644 (file)
@@ -390,7 +390,7 @@ static int conf_choice(struct menu *menu)
                }
                if (!child)
                        continue;
-               if (line[strlen(line) - 1] == '?') {
+               if (strlen(line) > 0 && line[strlen(line) - 1] == '?') {
                        printf("\n%s\n", child->sym->help ?
                                child->sym->help : nohelp_text);
                        continue;