diff options
Diffstat (limited to 'testing/libfuzzer/pdf_codec_fax_fuzzer.cc')
-rw-r--r-- | testing/libfuzzer/pdf_codec_fax_fuzzer.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/testing/libfuzzer/pdf_codec_fax_fuzzer.cc b/testing/libfuzzer/pdf_codec_fax_fuzzer.cc index 1a04c31aa0..60e2c9ff19 100644 --- a/testing/libfuzzer/pdf_codec_fax_fuzzer.cc +++ b/testing/libfuzzer/pdf_codec_fax_fuzzer.cc @@ -34,9 +34,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { EndOfLine, ByteAlign, BlackIs1, Columns, Rows)); - int line = 0; - while (decoder->GetScanline(line)) - line++; + if (decoder) { + int line = 0; + while (decoder->GetScanline(line)) + line++; + } return 0; } |