]> git.e2factory.org Git - e2factory.git/commitdiff
e2tool: add resultname error checking to dlist_recursive()
authorTobias Ulmer <tu@emlix.com>
Mon, 6 Feb 2017 16:13:29 +0000 (17:13 +0100)
committerTobias Ulmer <tu@emlix.com>
Mon, 6 Feb 2017 16:13:32 +0000 (17:13 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
local/e2tool.lua

index 9357a75135bdd8d906b7426bf1972d7494bf927b..225c3ec0b9103889eaa3fdbfa6625240c8a1f4cd 100644 (file)
@@ -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