-rw-r--r-- | parsing.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -72,4 +72,4 @@ int cgit_read_config(const char *filename, configfn fn) - /* cancel the reading of yet another configfile after 16 invocations */ - if (nesting++ > 16) + /* cancel deeply nested include-commands */ + if (nesting > 8) return -1; @@ -77,4 +77,6 @@ int cgit_read_config(const char *filename, configfn fn) return -1; + nesting++; while((len = read_config_line(f, line, &value, sizeof(line))) > 0) (*fn)(line, value); + nesting--; fclose(f); |