config: provide two memory-backed config backends

Provide two memory-backed configuration backends -- one that takes a
string in config file format `[section] key=value` and one that takes a
list of strings in `section.key=value` format.
This commit is contained in:
Edward Thomson
2023-07-20 22:27:25 +01:00
parent 248ac08cb8
commit 40ce52e51f
8 changed files with 351 additions and 53 deletions

View File

@@ -43,7 +43,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
goto out;
}
if ((err = git_config_backend_from_string(&backend, (const char*)data, size)) != 0) {
if ((err = git_config_backend_from_string(&backend, (const char*)data, size, NULL)) != 0) {
goto out;
}
if ((err = git_config_add_backend(cfg, backend, 0, NULL, 0)) != 0) {