summaryrefslogtreecommitdiff
path: root/core/fxcodec
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-09-21 15:35:42 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-09-21 15:35:42 +0000
commit214982c4d02a720c3b1b3de121cddc62189b8848 (patch)
tree7a1332cfe41ada262662e743bd98a6c688546b3d /core/fxcodec
parent8590a98297c5a56e63efc63931c1b3998160e049 (diff)
downloadpdfium-214982c4d02a720c3b1b3de121cddc62189b8848.tar.xz
Remove unreachable code in CPDF_DIBBase.
The colorspace is always available when creating image decoders that use colorspaces. Change-Id: I20ac75edcd614ccc1e83de262c128776e9d03eed Reviewed-on: https://pdfium-review.googlesource.com/42872 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcodec')
-rw-r--r--core/fxcodec/codec/ccodec_jpxmodule.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/fxcodec/codec/ccodec_jpxmodule.cpp b/core/fxcodec/codec/ccodec_jpxmodule.cpp
index 28221be340..2465ea7bd0 100644
--- a/core/fxcodec/codec/ccodec_jpxmodule.cpp
+++ b/core/fxcodec/codec/ccodec_jpxmodule.cpp
@@ -646,6 +646,8 @@ CCodec_JpxModule::~CCodec_JpxModule() {}
std::unique_ptr<CJPX_Decoder> CCodec_JpxModule::CreateDecoder(
pdfium::span<const uint8_t> src_span,
CPDF_ColorSpace* cs) {
+ // TODO(thestig): |cs| should never be nullptr in production, but
+ // pdf_jpx_fuzzer.cc passes that in.
auto decoder = pdfium::MakeUnique<CJPX_Decoder>(cs);
if (!decoder->Init(src_span))
return nullptr;