From 3772b8e3851cf5ccc3e87d486daf48816c048e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Wed, 13 Nov 2024 02:11:14 +0100 Subject: [PATCH] meson: disable subprocess command for fuzzing Allowing arbitrary command execution for the fuzzer is not ideal. While some testing of this code is valid, unsupervised fuzzing of the input is not. It may be better to add a dedicated test or fuzz-test for this case. --- meson.build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index cacbbcf115..a2ce73b5e5 100644 --- a/meson.build +++ b/meson.build @@ -414,7 +414,7 @@ endif if posix path_source = files('osdep/path-unix.c') - if cc.has_function('fork', prefix : '#include ') + if not get_option('fuzzers') and cc.has_function('fork', prefix : '#include ') sources += files('osdep/subprocess-posix.c') else sources += files('osdep/subprocess-dummy.c') @@ -516,9 +516,13 @@ if features['win32-desktop'] cc.find_library('version')] dependencies += win32_desktop_libs path_source = files('osdep/path-win.c') + if not get_option('fuzzers') + sources += files('osdep/subprocess-win.c') + else + sources += files('osdep/subprocess-dummy.c') + endif sources += files('input/ipc-win.c', 'osdep/language-win.c', - 'osdep/subprocess-win.c', 'osdep/terminal-win.c', 'video/out/w32_common.c', 'video/out/win32/displayconfig.c',