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

Fuzzer details

Fuzzer: lodepng_fuzzer

Call tree

The calltree shows the control flow of the fuzzer. This is overlaid with coverage information to display how much of the potential code a fuzzer can reach is in fact covered at runtime. In the following there is a link to a detailed calltree visualisation as well as a bitmap showing a high-level view of the calltree. For further information about these topics please see the glossary for full calltree and calltree overview

Call tree overview bitmap:

The distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 24 6.50%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 345 93.4%
All colors 369 100

Fuzz blockers

The followings are the branches where fuzzer fails to bypass.

Unique non-covered Complexity Unique Reachable Complexities Unique Reachable Functions All non-covered Complexity All Reachable Complexity Function Name Function Callsite Blocked Branch
3 3 1 :

['addColorBits(unsigned char*, unsigned long, unsigned int, unsigned int)']

3 3 rgba8ToPixel(unsignedchar*,unsignedlong,LodePNGColorModeconst*,ColorTree*,unsignedchar,unsignedchar,unsignedchar,unsignedchar) call site: 00000 /src/lodepng/lodepng.cpp:3443
3 3 1 :

['addColorBits(unsigned char*, unsigned long, unsigned int, unsigned int)']

3 3 rgba8ToPixel(unsignedchar*,unsignedlong,LodePNGColorModeconst*,ColorTree*,unsignedchar,unsignedchar,unsignedchar,unsignedchar) call site: 00000 /src/lodepng/lodepng.cpp:3463
0 17 2 :

['lodepng_memcpy(void*, void const*, unsigned long)', 'lodepng_get_raw_size(unsigned int, unsigned int, LodePNGColorMode const*)']

0 17 lodepng_convert(unsignedchar*,unsignedcharconst*,LodePNGColorModeconst*,LodePNGColorModeconst*,unsignedint,unsignedint) call site: 00000 /src/lodepng/lodepng.cpp:3826
0 2 1 :

['lodepng_memcpy(void*, void const*, unsigned long)']

0 2 getPixelColorsRGBA8(unsignedchar*,unsignedlong,unsignedcharconst*,LodePNGColorModeconst*) call site: 00000 /src/lodepng/lodepng.cpp:3681
0 2 1 :

['lodepng_memcpy(void*, void const*, unsigned long)']

0 2 getPixelColorsRGB8(unsignedchar*,unsignedlong,unsignedcharconst*,LodePNGColorModeconst*) call site: 00000 /src/lodepng/lodepng.cpp:3718
0 0 None 27 1427 decodeGeneric(unsignedchar**,unsignedint*,unsignedint*,LodePNGState*,unsignedcharconst*,unsignedlong) call site: 00000 /src/lodepng/lodepng.cpp:5315
0 0 None 0 17 lodepng_convert(unsignedchar*,unsignedcharconst*,LodePNGColorModeconst*,LodePNGColorModeconst*,unsignedint,unsignedint) call site: 00000 /src/lodepng/lodepng.cpp:3807
0 0 None 0 6 unfilterScanline(unsignedchar*,unsignedcharconst*,unsignedcharconst*,unsignedlong,unsignedchar,unsignedlong) call site: 00000 /src/lodepng/lodepng.cpp:4527
0 0 None 0 4 HuffmanTree_makeTable(HuffmanTree*) call site: 00000 /src/lodepng/lodepng.cpp:690
0 0 None 0 0 lodepng_chunk_next_const(unsignedcharconst*,unsignedcharconst*) call site: 00000 /src/lodepng/lodepng.cpp:2804
0 0 None 0 0 lodepng_inspect(unsignedint*,unsignedint*,LodePNGState*,unsignedcharconst*,unsignedlong) call site: 00000 /src/lodepng/lodepng.cpp:4311
0 0 None 0 0 lodepng_inspect(unsignedint*,unsignedint*,LodePNGState*,unsignedcharconst*,unsignedlong) call site: 00000 /src/lodepng/lodepng.cpp:4360

Runtime coverage analysis

Covered functions
120
Functions that are reachable but not covered
15
Reachable functions
254
Percentage of reachable functions covered
94.09%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/src/lodepng/lodepng_fuzzer.cpp 2
/src/lodepng/lodepng.cpp 124

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
lodepng::encode(std::__1::basic_string ,std::__1::allocator >const&,std::__1::vector >const&,unsignedint,unsignedint,LodePNGColorType,unsignedint) /src/lodepng/lodepng.cpp 6 ['N/A', 'N/A', 'int', 'int', 'int', 'int'] 16 0 68 9 4 323 0 1244 861
lodepng::decode(std::__1::vector >&,unsignedint&,unsignedint&,std::__1::basic_string ,std::__1::allocator >const&,LodePNGColorType,unsignedint) /src/lodepng/lodepng.cpp 6 ['N/A', 'N/A', 'N/A', 'N/A', 'int', 'int'] 16 0 88 10 10 266 0 935 47

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

Functions statically reachable by fuzzers
85.0%
219 / 258
Cyclomatic complexity statically reachable by fuzzers
89.0%
1784 / 2009

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 Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity