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

Unified Diff: core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp

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 | « no previous file | core/fxcodec/codec/fx_codec_fax.cpp » ('j') | testing/libfuzzer/pdf_codec_fax_fuzzer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
index 72a9518ca956a5a14537f768d13aa421a3b67e67..1b5bd024f8ddb3684d89d1a1c29804b2495ceaee 100644
--- a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
+++ b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
@@ -248,9 +248,6 @@ CCodec_ScanlineDecoder* FPDFAPI_CreateFaxDecoder(
if (Rows > USHRT_MAX) {
Rows = 0;
}
- if (Columns <= 0 || Rows < 0 || Columns > USHRT_MAX || Rows > USHRT_MAX) {
- return nullptr;
- }
}
return CPDF_ModuleMgr::Get()->GetFaxModule()->CreateDecoder(
src_buf, src_size, width, height, K, EndOfLine, ByteAlign, BlackIs1,
« no previous file with comments | « no previous file | core/fxcodec/codec/fx_codec_fax.cpp » ('j') | testing/libfuzzer/pdf_codec_fax_fuzzer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698