diff options
-rw-r--r-- | BUILD.gn | 1 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_function_embeddertest.cpp | 16 | ||||
-rw-r--r-- | testing/resources/bug_830221.pdf | 21 |
3 files changed, 38 insertions, 0 deletions
@@ -2965,6 +2965,7 @@ test("pdfium_embeddertests") { sources = [ "core/fpdfapi/edit/cpdf_creator_embeddertest.cpp", "core/fpdfapi/page/cpdf_docpagedata_embeddertest.cpp", + "core/fpdfapi/page/cpdf_function_embeddertest.cpp", "core/fpdfapi/page/cpdf_stitchfunc_embeddertest.cpp", "core/fpdfapi/parser/cpdf_parser_embeddertest.cpp", "core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp", diff --git a/core/fpdfapi/page/cpdf_function_embeddertest.cpp b/core/fpdfapi/page/cpdf_function_embeddertest.cpp new file mode 100644 index 0000000000..521cc0f814 --- /dev/null +++ b/core/fpdfapi/page/cpdf_function_embeddertest.cpp @@ -0,0 +1,16 @@ +// Copyright 2018 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "testing/embedder_test.h" +#include "testing/gtest/include/gtest/gtest.h" + +class CPDF_FunctionEmbeddertest : public EmbedderTest {}; + +TEST_F(CPDF_FunctionEmbeddertest, Crasher_830221) { + EXPECT_TRUE(OpenDocument("bug_830221.pdf")); + FPDF_PAGE page = LoadPage(0); + ASSERT_TRUE(page); + RenderLoadedPage(page); + UnloadPage(page); +} diff --git a/testing/resources/bug_830221.pdf b/testing/resources/bug_830221.pdf new file mode 100644 index 0000000000..317a5266ef --- /dev/null +++ b/testing/resources/bug_830221.pdf @@ -0,0 +1,21 @@ +%PDF +1 0 obj +<</Contents 1 0 R/Resources 4 0 R/K +j +6 0 obj +<</Functions[7 0 R] +/Domain [0 1] +/FunctionType 3/>>stream +/1 CS]2 0 obj<< /Kids[1 0 R]/ ou +3 0 obj +<< /Pages 2 0 R> +endobj +4 0 obj +<< /ColorSpace<</1 9 0 R>endobj +7 0 obj +<</Functions[6 0 R]/Domain[0 1] +/FunctionType 3 +/n +f +9 0 obj[/Sepa/1 /DeviceRGB 7 0 R]trailer +<</Root 3 0 R>>
\ No newline at end of file |