From 6133c0db955d0283daafd86060040ab7dcaaa98d Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 9 Oct 2023 13:32:01 +0200 Subject: just-mr json parsing: Add missing check for items type in lists --- src/other_tools/repo_map/repos_to_setup_map.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/other_tools/repo_map') 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>(); 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 -- cgit v1.2.3