summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/database.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/database.c b/src/database.c
index 18bf290..676d086 100644
--- a/src/database.c
+++ b/src/database.c
@@ -730,6 +730,10 @@ int apk_db_add_repository(apk_database_t _db, apk_blob_t repository)
char tmp[256];
int r;
+ if (repository.ptr == NULL || *repository.ptr == '\0'
+ || *repository.ptr == '#')
+ return 0;
+
if (db->num_repos >= APK_MAX_REPOS)
return -1;