From: Tobias Ulmer Date: Mon, 6 Feb 2017 16:13:29 +0000 (+0100) Subject: e2tool: add resultname error checking to dlist_recursive() X-Git-Tag: e2factory-2.3.17~24 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=e4fcbb5dfeb42adf2a2f7a8e60a8fe0256475750;p=e2factory.git e2tool: add resultname error checking to dlist_recursive() Signed-off-by: Tobias Ulmer --- diff --git a/local/e2tool.lua b/local/e2tool.lua index 9357a75..225c3ec 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -1208,6 +1208,15 @@ function e2tool.dlist_recursive(resultv) end for resultname in depends:iter() do + rc, re = e2tool.verify_src_res_name_valid_chars(resultname) + if not rc then + return false, err.new("'%s' is not a valid result name", resultname) + end + + if not result.results[resultname] then + return false, err.new("selecting invalid result: %s", resultname) + end + rc, re = visit(resultname) if not rc then return false, re