mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 23:03:35 +00:00
Reinit reader
pointer after reading included config file
Fixes #2869. If included file includes more files, it may reallocate cfg_file->readers, hence invalidate not only `r` pointer, but `result` pointer as well.
This commit is contained in:
parent
3ea78f241f
commit
1713653883
@ -1284,6 +1284,7 @@ static int config_parse(git_strmap *values, diskfile_backend *cfg_file, struct r
|
|||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
result = config_parse(values, cfg_file, r, level, depth+1);
|
result = config_parse(values, cfg_file, r, level, depth+1);
|
||||||
r = git_array_get(cfg_file->readers, index);
|
r = git_array_get(cfg_file->readers, index);
|
||||||
|
reader = git_array_get(cfg_file->readers, reader_idx);
|
||||||
}
|
}
|
||||||
else if (result == GIT_ENOTFOUND) {
|
else if (result == GIT_ENOTFOUND) {
|
||||||
giterr_clear();
|
giterr_clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user