Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: testing/libfuzzer/pdf_codec_fax_fuzzer.cc

Issue 2360283004: Bail out on bad size and height in CCodec_FaxDecoder::CreateDecoder (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxcodec/codec/fx_codec_fax.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/libfuzzer/pdf_codec_fax_fuzzer.cc
diff --git a/testing/libfuzzer/pdf_codec_fax_fuzzer.cc b/testing/libfuzzer/pdf_codec_fax_fuzzer.cc
index 1a04c31aa08842fe83aeafb7372393c88307625a..60e2c9ff19037ea903cfdb9202decc05ae079e98 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;
}
« no previous file with comments | « core/fxcodec/codec/fx_codec_fax.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698