summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r--core/fpdfapi/render/cpdf_dibsource.cpp6
-rw-r--r--core/fpdfapi/render/fpdf_render_loadimage_embeddertest.cpp9
2 files changed, 13 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;
diff --git a/core/fpdfapi/render/fpdf_render_loadimage_embeddertest.cpp b/core/fpdfapi/render/fpdf_render_loadimage_embeddertest.cpp
index 5103d787bd..e3bd297afb 100644
--- a/core/fpdfapi/render/fpdf_render_loadimage_embeddertest.cpp
+++ b/core/fpdfapi/render/fpdf_render_loadimage_embeddertest.cpp
@@ -40,3 +40,12 @@ TEST_F(FPDFRenderLoadImageEmbeddertest, Bug_603518) {
CompareBitmap(bitmap.get(), 749, 749, "b9e75190cdc5edf0069a408744ca07dc");
UnloadPage(page);
}
+
+TEST_F(FPDFRenderLoadImageEmbeddertest, Bug_1087) {
+ EXPECT_TRUE(OpenDocument("bug_1087.pdf"));
+ FPDF_PAGE page = LoadPage(0);
+ ASSERT_TRUE(page);
+ ScopedFPDFBitmap bitmap = RenderLoadedPage(page);
+ CompareBitmap(bitmap.get(), 548, 238, "2aac40afa121feb0f38883cb04a55001");
+ UnloadPage(page);
+}