History

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.

Kacper Michajłow committed 2 years ago

Commit 3772b8e1 parent b9820271 file · +6 −2Browse files

Unified · Split

meson.build+6−2
@@ -414,7 +414,7 @@ endif · 413 unmodified lines
414414
415415 if posix
416416 path_source = files('osdep/path-unix.c')
417− if cc.has_function('fork', prefix : '#include <unistd.h>')
417+ if not get_option('fuzzers') and cc.has_function('fork', prefix : '#include <unistd.h>')
418418 sources += files('osdep/subprocess-posix.c')
419419 else
420420 sources += files('osdep/subprocess-dummy.c')
@@ -516,9 +516,13 @@ if features['win32-desktop'] · 95 unmodified lines
516516 cc.find_library('version')]
517517 dependencies += win32_desktop_libs
518518 path_source = files('osdep/path-win.c')
519+ if not get_option('fuzzers')
520+ sources += files('osdep/subprocess-win.c')
521+ else
522+ sources += files('osdep/subprocess-dummy.c')
523+ endif
519524 sources += files('input/ipc-win.c',
520525 'osdep/language-win.c',
521− 'osdep/subprocess-win.c',
522526 'osdep/terminal-win.c',
523527 'video/out/w32_common.c',
524528 'video/out/win32/displayconfig.c',

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t