From e4fcbb5dfeb42adf2a2f7a8e60a8fe0256475750 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Mon, 6 Feb 2017 17:13:29 +0100 Subject: [PATCH] e2tool: add resultname error checking to dlist_recursive() Signed-off-by: Tobias Ulmer --- local/e2tool.lua | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- 2.39.5