Skip to content

Commit

Permalink
meson: disable subprocess command for fuzzing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kasper93 committed Nov 13, 2024
1 parent 3e362a0 commit 107c049
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ endif

if posix
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')
else
sources += files('osdep/subprocess-dummy.c')
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 107c049

Please sign in to comment.