Fuzz introspector
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues

Project functions overview

The following table shows data about each function in the project. The functions included in this table correspond to all functions that exist in the executables of the fuzzers. As such, there may be functions that are from third-party libraries.

For further technical details on the meaning of columns in the below table, please see the Glossary .

Func name Functions filename Args Function call depth Reached by Fuzzers Runtime reached by Fuzzers Combined reached by Fuzzers Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity

Analyses and suggestions

Optimal target analysis

Remaining optimal interesting functions

The following table shows a list of functions that are optimal targets. Optimal targets are identified by finding the functions that in combination, yield a high code coverage.

Func name Functions filename Arg count Args Function depth hitcount instr count bb count cyclomatic complexity Reachable functions Incoming references total cyclomatic complexity Unreached complexity
say_thread /src/espeak-ng/src/libespeak-ng/fifo.c 1 ['void*'] 31 0 58 8 16 473 0 6579 6553
espeak_ng_CompilePhonemeDataPath /src/espeak-ng/src/libespeak-ng/compiledata.c 5 ['long', 'char*', 'char*', 'FILE*', 'espeak_ng_ERROR_CONTEXT*'] 10 0 94 13 13 196 1 956 531
espeak_ng_STATUS::espeak_ng_CompileDictionary /src/espeak-ng/src/libespeak-ng/compiledict.c 5 ['char*', 'char*', 'FILE*', 'int', 'espeak_ng_ERROR_CONTEXT*'] 15 0 60 10 9 155 0 2055 260
MbrolaTranslate /src/espeak-ng/src/libespeak-ng/synth_mbrola.c 4 ['PHONEME_LIST*', 'int', 'bool', 'FILE*'] 9 0 140 35 39 57 0 526 80
init_mbrola /src/espeak-ng/src/libespeak-ng/mbrowrap.c 1 ['char*'] 4 0 28 7 7 47 0 75 75
getopt_long /src/espeak-ng/src/compat/getopt.c 5 ['int', 'char**', 'char*', 'struct option*', 'int*'] 3 0 83 24 29 10 0 69 69
espeak_ng_CompileIntonationPath /src/espeak-ng/src/libespeak-ng/compiledata.c 4 ['char*', 'char*', 'FILE*', 'espeak_ng_ERROR_CONTEXT*'] 4 0 209 42 65 45 1 157 67
uprintf /src/espeak-ng/src/ucd-tools/tests/printcdata.c 3 ['FILE*', 'codepoint_t', 'char*'] 3 0 62 18 21 57 2 2195 62
GetVoices /src/espeak-ng/src/libespeak-ng/voices.c 3 ['char*', 'int', 'int'] 4 0 33 9 15 30 3 59 48

Implementing fuzzers that target the above functions will improve reachability such that it becomes:

Functions statically reachable by fuzzers
63.0%
493 / 782
Cyclomatic complexity statically reachable by fuzzers
95.0%
7775 / 8209

All functions overview

If you implement fuzzers for these functions, the status of all functions in the project will be:

Func name Functions filename Args Function call depth Reached by Fuzzers Runtime reached by Fuzzers Combined reached by Fuzzers Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity

Fuzz driver synthesis

New fuzzers

The below fuzzers are templates and suggestions for how to target the set of optimal functions above

fifo.c

Target file: /src/espeak-ng/src/libespeak-ng/fifo.c
Target functions: say_thread
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target say_thread */
  UNKNOWN_TYPE unknown_0;
  say_thread(unknown_0);

  af_safe_gb_cleanup();
}

compiledata.c

Target file: /src/espeak-ng/src/libespeak-ng/compiledata.c
Target functions: espeak_ng_CompilePhonemeDataPath, espeak_ng_CompileIntonationPath
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target espeak_ng_CompilePhonemeDataPath */
  UNKNOWN_TYPE unknown_1;
  char *new_var2 = ada_safe_get_char_p();
  char *new_var3 = ada_safe_get_char_p();
  UNKNOWN_TYPE unknown_4;
  UNKNOWN_TYPE unknown_5;
  espeak_ng_CompilePhonemeDataPath(unknown_1, new_var2, new_var3, unknown_4, unknown_5);

  /* target espeak_ng_CompileIntonationPath */
  char *new_var21 = ada_safe_get_char_p();
  char *new_var22 = ada_safe_get_char_p();
  UNKNOWN_TYPE unknown_23;
  UNKNOWN_TYPE unknown_24;
  espeak_ng_CompileIntonationPath(new_var21, new_var22, unknown_23, unknown_24);

  af_safe_gb_cleanup();
}

compiledict.c

Target file: /src/espeak-ng/src/libespeak-ng/compiledict.c
Target functions: espeak_ng_STATUS::espeak_ng_CompileDictionary
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target espeak_ng_STATUS::espeak_ng_CompileDictionary */
  char *new_var6 = ada_safe_get_char_p();
  char *new_var7 = ada_safe_get_char_p();
  UNKNOWN_TYPE unknown_8;
  int new_var9 = ada_safe_get_int();
  UNKNOWN_TYPE unknown_10;
  espeak_ng_STATUS::espeak_ng_CompileDictionary(new_var6, new_var7, unknown_8, new_var9, unknown_10);

  af_safe_gb_cleanup();
}

synth_mbrola.c

Target file: /src/espeak-ng/src/libespeak-ng/synth_mbrola.c
Target functions: MbrolaTranslate
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target MbrolaTranslate */
  UNKNOWN_TYPE unknown_11;
  int new_var12 = ada_safe_get_int();
  UNKNOWN_TYPE unknown_13;
  UNKNOWN_TYPE unknown_14;
  MbrolaTranslate(unknown_11, new_var12, unknown_13, unknown_14);

  af_safe_gb_cleanup();
}

mbrowrap.c

Target file: /src/espeak-ng/src/libespeak-ng/mbrowrap.c
Target functions: init_mbrola
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target init_mbrola */
  char *new_var15 = ada_safe_get_char_p();
  init_mbrola(new_var15);

  af_safe_gb_cleanup();
}

getopt.c

Target file: /src/espeak-ng/src/compat/getopt.c
Target functions: getopt_long
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target getopt_long */
  int new_var16 = ada_safe_get_int();
  char **new_var17 = af_get_double_char_p();
  char *new_var18 = ada_safe_get_char_p();
  structoption* new_var19 = calloc(sizeof(structoption), 1);
  int *new_var20 = af_get_int_p();
  getopt_long(new_var16, new_var17, new_var18, new_var19, new_var20);

  af_safe_gb_cleanup();
}

printcdata.c

Target file: /src/espeak-ng/src/ucd-tools/tests/printcdata.c
Target functions: uprintf
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target uprintf */
  UNKNOWN_TYPE unknown_25;
  UNKNOWN_TYPE unknown_26;
  char *new_var27 = ada_safe_get_char_p();
  uprintf(unknown_25, unknown_26, new_var27);

  af_safe_gb_cleanup();
}

voices.c

Target file: /src/espeak-ng/src/libespeak-ng/voices.c
Target functions: GetVoices
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target GetVoices */
  char *new_var28 = ada_safe_get_char_p();
  int new_var29 = ada_safe_get_int();
  int new_var30 = ada_safe_get_int();
  GetVoices(new_var28, new_var29, new_var30);

  af_safe_gb_cleanup();
}

Files and Directories in report

This section shows which files and directories are considered in this report. The main reason for showing this is fuzz introspector may include more code in the reasoning than is desired. This section helps identify if too many files/directories are included, e.g. third party code, which may be irrelevant for the threat model. In the event too much is included, fuzz introspector supports a configuration file that can exclude data from the report. See the following link for more information on how to create a config file: link

Files in report

Source file Reached by Covered by
/src/espeak-ng/src/libespeak-ng/error.c ['tests/ssml-fuzzer.c', 'tests/fuzzing/synth_fuzzer.c'] []
/src/espeak-ng/src/libespeak-ng/phonemelist.c [] []
/src/espeak-ng/tests/dummy.cpp [] []
/src/espeak-ng/src/libespeak-ng/phoneme.c [] []
/src/espeak-ng/src/libespeak-ng/langopts.c [] []
/src/espeak-ng/src/libespeak-ng/espeak_api.c ['tests/ssml-fuzzer.c', 'tests/fuzzing/synth_fuzzer.c'] []
/src/espeak-ng/src/ucd-tools/src/ctype.c [] []
/src/espeak-ng/src/speechPlayer/src/speechWaveGenerator.cpp [] []
/src/espeak-ng/src/speechPlayer/src/utils.h [] []
/src/espeak-ng/src/libespeak-ng/encoding.c [] []
/src/espeak-ng/src/libespeak-ng/translateword.c [] []
/src/espeak-ng/src/libespeak-ng/mnemonics.c [] []
/src/espeak-ng/src/libespeak-ng/ieee80.c [] []
/src/espeak-ng/src/libespeak-ng/sPlayer.c [] []
/src/espeak-ng/emscripten/espeakng_glue.cpp [] []
/src/espeak-ng/src/libespeak-ng/espeak_command.c [] []
/src/espeak-ng/src/libespeak-ng/numbers.c [] []
/src/espeak-ng/src/ucd-tools/src/scripts.c [] []
/src/espeak-ng/src/libespeak-ng/wavegen.c [] []
/src/espeak-ng/src/libespeak-ng/klatt.c [] []
/src/espeak-ng/src/windows/com/comentrypoints.c [] []
/src/espeak-ng/src/libespeak-ng/translate.c [] []
/src/espeak-ng/android/jni/include/Log.h [] []
/src/espeak-ng/src/libespeak-ng/voices.c [] []
/src/espeak-ng/src/libespeak-ng/translate.h [] []
/src/espeak-ng/src/speechPlayer/src/speechPlayer.cpp [] []
/src/espeak-ng/tests/ssml-fuzzer.c ['tests/ssml-fuzzer.c'] []
/src/espeak-ng/src/libespeak-ng/synth_mbrola.c [] []
/src/espeak-ng/src/speechPlayer/src/frame.cpp [] []
/src/espeak-ng/android/jni/jni/eSpeakService.c [] []
/src/espeak-ng/tests/fuzzing/synth_fuzzer.c ['tests/fuzzing/synth_fuzzer.c'] []
/src/espeak-ng/src/ucd-tools/src/tostring.c [] []
/src/espeak-ng/src/ucd-tools/src/proplist.c [] []
/src/espeak-ng/src/libespeak-ng/fifo.c [] []
/src/espeak-ng/src/libespeak-ng/setlengths.c [] []
/src/espeak-ng/src/libespeak-ng/intonation.c [] []
/src/espeak-ng/src/compat/getopt.c [] []
/src/espeak-ng/src/libespeak-ng/phoneme.h [] []
/src/espeak-ng/src/libespeak-ng/tr_languages.c [] []
/src/espeak-ng/src/libespeak-ng/synthesize.c [] []
/src/espeak-ng/src/libespeak-ng/ssml.c [] []
/src/espeak-ng/src/ucd-tools/src/case.c [] []
/src/espeak-ng/src/libespeak-ng/mbrowrap.c [] []
/src/espeak-ng/src/ucd-tools/src/categories.c [] []
/src/espeak-ng/tests/readclause.c [] []
/src/espeak-ng/src/speechPlayer/src/frame.h [] []
/src/espeak-ng/src/libespeak-ng/readclause.c [] []
/src/espeak-ng/src/include/compat/string.h [] []
/src/espeak-ng/src/libespeak-ng/speech.h [] []
/src/espeak-ng/src/libespeak-ng/spect.c [] []
/src/espeak-ng/src/libespeak-ng/common.c ['tests/ssml-fuzzer.c', 'tests/fuzzing/synth_fuzzer.c'] []
/src/espeak-ng/src/windows/com/ttsengine.cpp [] []
/src/espeak-ng/src/libespeak-ng/dictionary.c [] []
/src/espeak-ng/src/include/compat/endian.h [] []
/src/espeak-ng/tests/api.c [] []
/src/espeak-ng/src/espeak-ng.c [] []
/src/espeak-ng/src/libespeak-ng/synthdata.c [] []
/src/espeak-ng/src/ucd-tools/src/include/ucd/ucd.h [] []
/src/espeak-ng/src/libespeak-ng/compiledata.c [] []
/src/espeak-ng/src/libespeak-ng/compilembrola.c [] []
/src/espeak-ng/src/libespeak-ng/compiledict.c [] []
/src/espeak-ng/tests/encoding.c [] []
/src/espeak-ng/src/ucd-tools/tests/printcdata.c [] []
/src/espeak-ng/src/speechPlayer/src/speechWaveGenerator.h [] []
/src/espeak-ng/src/include/compat/sys/stat.h [] []
/src/espeak-ng/src/libespeak-ng/soundicon.c [] []
/src/espeak-ng/src/libespeak-ng/speech.c ['tests/ssml-fuzzer.c', 'tests/fuzzing/synth_fuzzer.c'] []
/src/espeak-ng/tests/test_assert.h [] []
/src/espeak-ng/src/libespeak-ng/event.c [] []

Directories in report

Directory
/src/espeak-ng/src/speechPlayer/src/
/src/espeak-ng/tests/
/src/espeak-ng/tests/fuzzing/
/src/espeak-ng/src/libespeak-ng/
/src/espeak-ng/android/jni/include/
/src/espeak-ng/src/ucd-tools/src/include/ucd/
/src/espeak-ng/src/compat/
/src/espeak-ng/src/ucd-tools/src/
/src/espeak-ng/src/windows/com/
/src/espeak-ng/src/
/src/espeak-ng/android/jni/jni/
/src/espeak-ng/src/include/compat/
/src/espeak-ng/src/ucd-tools/tests/
/src/espeak-ng/src/include/compat/sys/
/src/espeak-ng/emscripten/