diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-10-09 13:32:01 +0200 |
---|---|---|
committer | Alberto Sartori <alberto.sartori@huawei.com> | 2023-11-15 20:19:18 +0100 |
commit | 6133c0db955d0283daafd86060040ab7dcaaa98d (patch) | |
tree | 955a3ae527336a8ee8e19bbe6fce05df210143d9 /src/other_tools/repo_map | |
parent | ff7b59e8b28305651a65eb214073e640e6dbffd9 (diff) | |
download | justbuild-6133c0db955d0283daafd86060040ab7dcaaa98d.tar.gz |
just-mr json parsing: Add missing check for items type in lists
Diffstat (limited to 'src/other_tools/repo_map')
-rw-r--r-- | src/other_tools/repo_map/repos_to_setup_map.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/other_tools/repo_map/repos_to_setup_map.cpp b/src/other_tools/repo_map/repos_to_setup_map.cpp index 9644d615..94b7bed5 100644 --- a/src/other_tools/repo_map/repos_to_setup_map.cpp +++ b/src/other_tools/repo_map/repos_to_setup_map.cpp @@ -434,6 +434,13 @@ void DistdirCheckout(ExpressionPtr const& repo_desc, // create list of archives to fetch auto dist_repos_to_fetch = std::make_shared<std::vector<ArchiveContent>>(); for (auto const& dist_repo : distdir_repos) { + if (not dist_repo->IsString()) { + (*logger)(fmt::format("DistdirCheckout: Unsupported value {} for " + "\"repositories\" list entry", + dist_repo->ToString()), + /*fatal=*/true); + return; + } // get name of dist_repo auto dist_repo_name = dist_repo->String(); // check that repo name exists |