repo: Fix possible null pointer dereference

Signed-off-by: Sven Strickroth <email@cs-ware.de>
This commit is contained in:
Sven Strickroth
2026-04-16 19:42:46 +02:00
parent 1f34e2a57a
commit 0bbc49b9e3

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;