X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=src%2Fecoli_parse.c;h=3b2707044f9ca1cea03776d7d174857989d70f68;hb=bfc32eb38d93d86ce294ede5527bcbb34db5dd78;hp=3d6be77a41b672c3dcb448f97053d304967ea736;hpb=18d03456d96f7a086a2ccc82ce97fcf056848d90;p=protos%2Flibecoli.git diff --git a/src/ecoli_parse.c b/src/ecoli_parse.c index 3d6be77..3b27070 100644 --- a/src/ecoli_parse.c +++ b/src/ecoli_parse.c @@ -42,6 +42,8 @@ static int __ec_node_parse_child(const struct ec_node *node, struct ec_parse *child = NULL; int ret; + // XXX limit max number of recursions to avoid segfault + if (ec_node_type(node)->parse == NULL) { errno = ENOTSUP; return -1;