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.
Unified · Split
| @@ -414,7 +414,7 @@ endif · 413 unmodified lines | ||
| 414 | 414 | |
| 415 | 415 | if posix |
| 416 | 416 | 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>') | |
| 418 | 418 | sources += files('osdep/subprocess-posix.c') |
| 419 | 419 | else |
| 420 | 420 | sources += files('osdep/subprocess-dummy.c') |
| @@ -516,9 +516,13 @@ if features['win32-desktop'] · 95 unmodified lines | ||
| 516 | 516 | cc.find_library('version')] |
| 517 | 517 | dependencies += win32_desktop_libs |
| 518 | 518 | 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 | |
| 519 | 524 | sources += files('input/ipc-win.c', |
| 520 | 525 | 'osdep/language-win.c', |
| 521 | − 'osdep/subprocess-win.c', | |
| 522 | 526 | 'osdep/terminal-win.c', |
| 523 | 527 | 'video/out/w32_common.c', |
| 524 | 528 | 'video/out/win32/displayconfig.c', |