Commit 42c4c624 by Etienne Samson Committed by Edward Thomson

config: assert that our parameters are valid

CID 1395011
parent a09a1028
......@@ -513,6 +513,8 @@ int git_config_backend_foreach_match(
regex_t regex;
int error = 0;
assert(backend && cb);
if (regexp != NULL) {
if ((error = p_regcomp(&regex, regexp, REG_EXTENDED)) != 0) {
giterr_set_regex(&regex, error);
......
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