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:
parent
dbe7588c0a
commit
f2bd808b86
@ -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);
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user