projects
/
SymbiYosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9beb469
)
Add check for malformed dst filename in [files] section
author
Clifford Wolf
<clifford@clifford.at>
Fri, 13 Apr 2018 16:03:35 +0000
(18:03 +0200)
committer
Clifford Wolf
<clifford@clifford.at>
Fri, 13 Apr 2018 16:03:35 +0000
(18:03 +0200)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
sbysrc/sby_core.py
patch
|
blob
|
history
diff --git
a/sbysrc/sby_core.py
b/sbysrc/sby_core.py
index 8a8fa2debf47cb2e81b9f4649b7819be135b4490..cf794d954a6478ffd4ada370248dd58c5afe5f7b 100644
(file)
--- 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("~/"):