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

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
8 8 4 :

['__cxa_allocate_exception', 'std::runtime_error::runtime_error(char const*)', '__cxa_free_exception', '__cxa_throw']

8 8 Pl_LZWDecoder::getFirstChar(unsignedint) call site: 00000 /src/qpdf/libqpdf/Pl_LZWDecoder.cc:91
8 8 4 :

['__cxa_allocate_exception', 'std::runtime_error::runtime_error(char const*)', '__cxa_free_exception', '__cxa_throw']

8 8 Pl_LZWDecoder::addToTable(unsignedchar) call site: 00000 /src/qpdf/libqpdf/Pl_LZWDecoder.cc:116
0 0 None 0 0 Buffer::Members::Members(unsignedlong,unsignedchar*,bool) call site: 00000 /src/qpdf/libqpdf/Buffer.cc:23

Fuzzer calltree

0 LLVMFuzzerTestOneInput [function] [call site] 00000
1 FuzzHelper::FuzzHelper(unsigned char const*, unsigned long) [function] [call site] 00001
1 FuzzHelper::run() [function] [call site] 00002
2 FuzzHelper::doChecks() [function] [call site] 00003
3 Pl_Discard::Pl_Discard() [function] [call site] 00004
4 Pipeline::Pipeline(char const*, Pipeline*) [function] [call site] 00005
3 Pl_LZWDecoder::Pl_LZWDecoder(char const*, Pipeline*, bool) [function] [call site] 00006
4 Pipeline::Pipeline(char const*, Pipeline*) [function] [call site] 00007
3 Pl_LZWDecoder::write(unsigned char const*, unsigned long) [function] [call site] 00008
4 Pl_LZWDecoder::sendNextCode() [function] [call site] 00009
5 Pl_LZWDecoder::handleCode(unsigned int) [function] [call site] 00010
6 QTC::TC(char const*, char const*, int) [function] [call site] 00011
6 unsigned int QIntC::to_uint<unsigned long>(unsigned long const&) [function] [call site] 00012
7 QIntC::IntConverter<unsigned long, unsigned int, false, false>::convert(unsigned long const&) [function] [call site] 00013
8 QIntC::IntConverter<unsigned long, unsigned int, false, false>::error(unsigned long) [function] [call site] 00014
9 __cxa_allocate_exception [call site] 00015
9 std::range_error::range_error[abi:v180000](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) [function] [call site] 00016
10 std::runtime_error::runtime_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) [call site] 00017
6 __cxa_allocate_exception [call site] 00018
6 QTC::TC(char const*, char const*, int) [function] [call site] 00019
6 Pl_LZWDecoder::getFirstChar(unsigned int) [function] [call site] 00020
7 __cxa_allocate_exception [call site] 00021
7 Buffer::getBuffer() [function] [call site] 00022
7 __cxa_allocate_exception [call site] 00023
6 Pl_LZWDecoder::getFirstChar(unsigned int) [function] [call site] 00024
6 __cxa_allocate_exception [call site] 00025
6 Pl_LZWDecoder::addToTable(unsigned char) [function] [call site] 00026
7 __cxa_allocate_exception [call site] 00027
7 Buffer::getBuffer() [function] [call site] 00028
7 Buffer::getSize() const [function] [call site] 00029
7 unsigned int QIntC::to_uint<unsigned long>(unsigned long const&) [function] [call site] 00030
7 __cxa_allocate_exception [call site] 00031
7 Buffer::Buffer(unsigned long) [function] [call site] 00032
8 Buffer::Members::Members(unsigned long, unsigned char*, bool) [function] [call site] 00033
7 Buffer::getBuffer() [function] [call site] 00034
7 Buffer::~Buffer() [function] [call site] 00035
6 Pipeline::getNext(bool) [function] [call site] 00036
7 __cxa_allocate_exception [call site] 00037
6 __cxa_allocate_exception [call site] 00038
6 Pipeline::getNext(bool) [function] [call site] 00039
6 Buffer::getBuffer() [function] [call site] 00040
3 Pl_LZWDecoder::finish() [function] [call site] 00041
4 Pipeline::getNext(bool) [function] [call site] 00042
3 Pl_LZWDecoder::~Pl_LZWDecoder() [function] [call site] 00043
4 Pipeline::~Pipeline() [function] [call site] 00044
3 Pl_Discard::~Pl_Discard() [function] [call site] 00045
2 __cxa_begin_catch [call site] 00046
2 __cxa_end_catch [call site] 00047