mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
repo: Fix possible null pointer dereference
Signed-off-by: Sven Strickroth <email@cs-ware.de>
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;
|
||||
const char *test_path;
|
||||
|
||||
if (strcmp(entry->value, "") == 0) {
|
||||
if (!entry->value || strcmp(entry->value, "") == 0) {
|
||||
*data->is_safe = false;
|
||||
} else if (strcmp(entry->value, "*") == 0) {
|
||||
*data->is_safe = true;
|
||||
|
||||
Reference in New Issue
Block a user