aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorNarendra Vardi <narendravardi1127@gmail.com>2017-10-15 21:51:43 +0530
committerJussi Pakkanen <jpakkane@gmail.com>2017-10-19 20:17:52 +0300
commit6083eb29d0d5d81510a588dc64f5533ef58bb8e0 (patch)
treee52298374988632626fd8161d9c35e1a0b5bb152 /mesonbuild
parentfd860482e57b94a3a57e10a57f374cb46d516d40 (diff)
downloadmeson-6083eb29d0d5d81510a588dc64f5533ef58bb8e0.zip
meson-6083eb29d0d5d81510a588dc64f5533ef58bb8e0.tar.gz
meson-6083eb29d0d5d81510a588dc64f5533ef58bb8e0.tar.bz2
Do not allow escaping the subprojects directory.
Fixes #2306
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/interpreter.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index bfd946a..e385a88 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -1663,6 +1663,8 @@ class Interpreter(InterpreterBase):
return self.do_subproject(dirname, kwargs)
def do_subproject(self, dirname, kwargs):
+ if '/' in dirname or '\\' in dirname:
+ raise InterpreterException('Subproject name must not contain a path separator.')
if dirname in self.subproject_stack:
fullstack = self.subproject_stack + [dirname]
incpath = ' => '.join(fullstack)