From fa727cd22f6df7ac3c8b9fc67a3dbe58593788bd Mon Sep 17 00:00:00 2001 From: vapier Date: Sat, 30 Dec 2006 19:30:20 +0000 Subject: prevent buffer underflows with empty lines git-svn-id: svn://busybox.net/trunk/busybox@17108 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- 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; -- cgit v1.2.3-55-g6feb