diff options
author | tsepez <tsepez@chromium.org> | 2016-11-11 17:55:40 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-11 17:55:40 -0800 |
commit | 6e1d6032b7990cdf580c99ff491a1b761ee39ca6 (patch) | |
tree | c880c69a8ef1372511a0fecac0bf3d61b1eabe75 /fpdfsdk/fpdfppo_embeddertest.cpp | |
parent | 211d4edbe2f71ca62c76f36ce25090342c58e43c (diff) | |
download | pdfium-6e1d6032b7990cdf580c99ff491a1b761ee39ca6.tar.xz |
Fix unique ptrs in fpdfppo.cpp
There's a path out that deletes a pointer whose ownership
was passed off earlier. This will get simpler once more
APIs take unique_ptr.
BUG=664284
Review-Url: https://codereview.chromium.org/2495003006
Diffstat (limited to 'fpdfsdk/fpdfppo_embeddertest.cpp')
-rw-r--r-- | fpdfsdk/fpdfppo_embeddertest.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfppo_embeddertest.cpp b/fpdfsdk/fpdfppo_embeddertest.cpp index 3149f072f5..0972316534 100644 --- a/fpdfsdk/fpdfppo_embeddertest.cpp +++ b/fpdfsdk/fpdfppo_embeddertest.cpp @@ -90,3 +90,17 @@ TEST_F(FPDFPPOEmbeddertest, GoodRanges) { UnloadPage(page); } + +TEST_F(FPDFPPOEmbeddertest, BUG_664284) { + EXPECT_TRUE(OpenDocument("bug_664284.pdf")); + + FPDF_PAGE page = LoadPage(0); + EXPECT_TRUE(page); + + FPDF_DOCUMENT output_doc = FPDF_CreateNewDocument(); + EXPECT_TRUE(output_doc); + EXPECT_TRUE(FPDF_ImportPages(output_doc, document(), "1", 0)); + FPDF_CloseDocument(output_doc); + + UnloadPage(page); +} |