summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-04-05 17:54:26 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-05 17:54:26 +0000
commit10f9fb3f10bc47b3317fe1c8b55711015fb7de87 (patch)
tree6c0eb743dcb4811a65e53a045db52c7ffc090cc5 /fpdfsdk
parent0a3083377ab87c841cec180932b57a416f6475d2 (diff)
downloadpdfium-10f9fb3f10bc47b3317fe1c8b55711015fb7de87.tar.xz
Ignore bad data in the shared object hint table.
Currently this is being treated as a case of "data not available" which leads to an infinite loop. BUG=pdfium:1055 Change-Id: I2722a5b364d56a4ad5b7cca2a4b42e6b13a933f4 Reviewed-on: https://pdfium-review.googlesource.com/29831 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_view_embeddertest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_view_embeddertest.cpp b/fpdfsdk/fpdf_view_embeddertest.cpp
index 0bfa1a30b2..8d2cd3af1b 100644
--- a/fpdfsdk/fpdf_view_embeddertest.cpp
+++ b/fpdfsdk/fpdf_view_embeddertest.cpp
@@ -390,6 +390,15 @@ TEST_F(FPDFViewEmbeddertest, Hang_360) {
EXPECT_FALSE(OpenDocument("bug_360.pdf"));
}
+// Deliberately damaged version of linearized.pdf with bad data in the shared
+// object hint table.
+TEST_F(FPDFViewEmbeddertest, Hang_1055) {
+ EXPECT_TRUE(OpenDocumentLinearized("linearized_bug_1055.pdf"));
+ int version;
+ EXPECT_TRUE(FPDF_GetFileVersion(document(), &version));
+ EXPECT_EQ(16, version);
+}
+
void FPDFViewEmbeddertest::TestRenderPageBitmapWithMatrix(
FPDF_PAGE page,
const int bitmap_width,