Merge pull request #7225 from csware/nullptr-deref

repo: Fix possible null pointer dereference
This commit is contained in:
Edward Thomson
2026-04-23 21:31:09 +01:00
committed by GitHub

View File

@@ -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;