From: Mike Frysinger Date: Sat, 30 Dec 2006 19:30:20 +0000 (-0000) Subject: prevent buffer underflows with empty lines X-Git-Tag: 1_4_0~155 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=40ae9b56174513c9e843f7b479bc64e14b2f1b64;p=oweals%2Fbusybox.git prevent buffer underflows with empty lines --- 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;