From: Clifford Wolf Date: Fri, 13 Apr 2018 16:03:35 +0000 (+0200) Subject: Add check for malformed dst filename in [files] section X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=836d54d4c7a0db9072026d81bed1ca91c3c913a3;p=SymbiYosys.git Add check for malformed dst filename in [files] section Signed-off-by: Clifford Wolf --- diff --git a/sbysrc/sby_core.py b/sbysrc/sby_core.py index 8a8fa2d..cf794d9 100644 --- a/sbysrc/sby_core.py +++ b/sbysrc/sby_core.py @@ -230,6 +230,8 @@ class SbyJob: f.write(line) for dstfile, srcfile in self.files.items(): + if dstfile.startswith("/") or dstfile.startswith("../") or ("/../" in dstfile): + self.error("destination filename must be a relative path without /../: %s" % dstfile) dstfile = self.workdir + "/src/" + dstfile if srcfile.startswith("~/"):