mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
Merge pull request #7225 from csware/nullptr-deref
repo: Fix possible null pointer dereference
This commit is contained in:
@@ -577,7 +577,7 @@ static int validate_ownership_cb(const git_config_entry *entry, void *payload)
|
|||||||
validate_ownership_data *data = payload;
|
validate_ownership_data *data = payload;
|
||||||
const char *test_path;
|
const char *test_path;
|
||||||
|
|
||||||
if (strcmp(entry->value, "") == 0) {
|
if (!entry->value || strcmp(entry->value, "") == 0) {
|
||||||
*data->is_safe = false;
|
*data->is_safe = false;
|
||||||
} else if (strcmp(entry->value, "*") == 0) {
|
} else if (strcmp(entry->value, "*") == 0) {
|
||||||
*data->is_safe = true;
|
*data->is_safe = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user