Fix issue #4046 Seg fault in config_files() · Pull Request #4052 · libgit2/libgit2 · GitHub
Skip to content

Fix issue #4046 Seg fault in config_files()#4052

Merged
ethomson merged 1 commit into
masterfrom
unknown repository
Dec 30, 2016
Merged

Fix issue #4046 Seg fault in config_files()#4052
ethomson merged 1 commit into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Dec 29, 2016

Copy link
Copy Markdown

According to the comments in the config.h file, git_config_get_string() needs a config snapshot. Added call to git_repository_config_snapshot() to get this snapshot.

Added a "repo" parameter to config_files(), which is used by git_repository_config_snapshot().

I also tested (but did not commit) having git_config_get_int32() use the config snapshot. This worked, and if implemented could eliminate the "repo_path" parameter to config_files().

@ghost

ghost commented Dec 30, 2016

Copy link
Copy Markdown
Author

@ethomson

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant