prevent buffer underflows with empty lines

1_4_stable
Mike Frysinger 2006-12-30 19:30:20 +00:00
parent c255f8b492
commit 40ae9b5617
1 changed files with 1 additions and 1 deletions

View 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;