Fix segfault in parser if options == PARSE_MAX_LIST-1

Reported by Armael
Increase PARSE_MAX_LIST from 10 to 32
This commit is contained in:
Philippe Pepiot 2010-12-25 16:25:42 +01:00
parent dbe7588c0a
commit f2bd808b86
2 changed files with 2 additions and 2 deletions

View File

@ -436,7 +436,7 @@ get_option(struct keyword **head)
while (kw && kw->type != LIST_END) {
switch (kw->type) {
case WORD:
if (j > (PARSE_MAX_LIST - 1)) {
if (j >= (PARSE_MAX_LIST - 1)) {
syntax(kw, "too much values in list");
return free_opt(o);
}

View File

@ -21,7 +21,7 @@
#include <sys/queue.h>
#define INCLUDE_CMD "@include"
#define PARSE_MAX_LIST 10
#define PARSE_MAX_LIST 32
#if defined(Bool)
#define bool_t Bool