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.
This commit is contained in:
Kacper Michajłow 2024-11-13 02:11:14 +01:00
parent b982027b64
commit 3772b8e385
1 changed files with 6 additions and 2 deletions

View File

@ -414,7 +414,7 @@ endif
if posix if posix
path_source = files('osdep/path-unix.c') path_source = files('osdep/path-unix.c')
if cc.has_function('fork', prefix : '#include <unistd.h>') if not get_option('fuzzers') and cc.has_function('fork', prefix : '#include <unistd.h>')
sources += files('osdep/subprocess-posix.c') sources += files('osdep/subprocess-posix.c')
else else
sources += files('osdep/subprocess-dummy.c') sources += files('osdep/subprocess-dummy.c')
@ -516,9 +516,13 @@ if features['win32-desktop']
cc.find_library('version')] cc.find_library('version')]
dependencies += win32_desktop_libs dependencies += win32_desktop_libs
path_source = files('osdep/path-win.c') 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', sources += files('input/ipc-win.c',
'osdep/language-win.c', 'osdep/language-win.c',
'osdep/subprocess-win.c',
'osdep/terminal-win.c', 'osdep/terminal-win.c',
'video/out/w32_common.c', 'video/out/w32_common.c',
'video/out/win32/displayconfig.c', 'video/out/win32/displayconfig.c',