From db0f9218371db37f3755994f25f1d0cef975596c Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Tue, 14 Jul 2015 18:34:43 +0100 Subject: [PATCH] Catch blank repository strings on masterlist update. --- src/backend/masterlist.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/masterlist.cpp b/src/backend/masterlist.cpp index 5ed12160..2ca51723 100644 --- a/src/backend/masterlist.cpp +++ b/src/backend/masterlist.cpp @@ -94,6 +94,9 @@ namespace loot { fs::path repo_path = path.parent_path(); string filename = path.filename().string(); + if (repoURL.empty() || repoBranch.empty()) + throw error(error::invalid_args, "Repository URL and branch must not be empty."); + // First initialise some stuff that isn't specific to a repository. BOOST_LOG_TRIVIAL(debug) << "Setting up checkout options."; char * paths = new char[filename.length() + 1];