summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_dibsource.cpp
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2018-05-31 17:29:12 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-31 17:29:12 +0000
commitdd5459ce862dfe709b88f698a28e72b31be6fb7c (patch)
tree770688822e61177ce278991679d5f326962c67ac /core/fpdfapi/render/cpdf_dibsource.cpp
parent4023c874911d5fbc9d18a4f00e1e6b30ab0194ee (diff)
downloadpdfium-dd5459ce862dfe709b88f698a28e72b31be6fb7c.tar.xz
Handle image mask continuous loading correctly
When image mask doesn't need multi-steps to load, ContinueLoadMaskDIB() will return LoadState::kFail as result. For this case, the loading should continue as usual instead of aborting. BUG=pdfium:1087 Change-Id: I5c43a67e43469ac7febca4c0cf1faa96ee105206 Reviewed-on: https://pdfium-review.googlesource.com/33310 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Wei Li <weili@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_dibsource.cpp')
-rw-r--r--core/fpdfapi/render/cpdf_dibsource.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/fpdfapi/render/cpdf_dibsource.cpp b/core/fpdfapi/render/cpdf_dibsource.cpp
index 3a4ca02cc2..d1eba2e467 100644
--- a/core/fpdfapi/render/cpdf_dibsource.cpp
+++ b/core/fpdfapi/render/cpdf_dibsource.cpp
@@ -323,8 +323,10 @@ CPDF_DIBSource::LoadState CPDF_DIBSource::ContinueLoadDIBSource(
LoadState iContinueStatus = LoadState::kSuccess;
if (m_bHasMask) {
- iContinueStatus = ContinueLoadMaskDIB(pPause);
- m_Status = LoadState::kContinue;
+ if (ContinueLoadMaskDIB(pPause) == LoadState::kContinue) {
+ iContinueStatus = LoadState::kContinue;
+ m_Status = LoadState::kContinue;
+ }
}
if (iContinueStatus == LoadState::kContinue)
return LoadState::kContinue;