Commit 715bfe10 by Edward Thomson

config: test allocation in config conditionals

parent 83a1e614
...@@ -742,6 +742,8 @@ static int parse_conditional_include(config_file_parse_data *parse_data, const c ...@@ -742,6 +742,8 @@ static int parse_conditional_include(config_file_parse_data *parse_data, const c
condition = git__substrdup(section + CONST_STRLEN("includeIf."), condition = git__substrdup(section + CONST_STRLEN("includeIf."),
section_len - CONST_STRLEN("includeIf.") - CONST_STRLEN(".path")); section_len - CONST_STRLEN("includeIf.") - CONST_STRLEN(".path"));
GIT_ERROR_CHECK_ALLOC(condition);
for (i = 0; i < ARRAY_SIZE(conditions); i++) { for (i = 0; i < ARRAY_SIZE(conditions); i++) {
if (git__prefixcmp(condition, conditions[i].prefix)) if (git__prefixcmp(condition, conditions[i].prefix))
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment