From 40ae9b56174513c9e843f7b479bc64e14b2f1b64 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 30 Dec 2006 19:30:20 +0000 Subject: [PATCH] prevent buffer underflows with empty lines --- scripts/kconfig/conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index a95ba93e2..ca722b05d 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -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;