]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
test: Avoid arbitrary Python injection if compiled in a path with quotes
authorSimon McVittie <smcv@collabora.com>
Thu, 23 Jun 2022 18:27:24 +0000 (19:27 +0100)
committerSimon McVittie <smcv@collabora.com>
Wed, 13 Jul 2022 19:36:13 +0000 (20:36 +0100)
Signed-off-by: Simon McVittie <smcv@collabora.com>
test/meson.build

index e1d14fecd9ab1128c828a51beedfe603ffd7503a..e65c5c384944e808a167265d898bd5e3e1dac4ea 100644 (file)
@@ -76,7 +76,9 @@ test_env.set('DBUS_TEST_UNINSTALLED', '1')
 
 xdgdir = custom_target('gen-xdgdir',
     command: [
-        python, '-c', 'import os; os.makedirs("@0@", exist_ok=True)'.format(meson.current_build_dir() / 'XDG_RUNTIME_DIR')
+        python, '-c',
+        'import os, sys; os.makedirs(sys.argv[1], exist_ok=True)',
+        meson.current_build_dir() / 'XDG_RUNTIME_DIR',
     ],
     output: 'XDG_RUNTIME_DIR'
 )