Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp

Issue 1406943005: Clear decoders after the image decoder in the /Filter array (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: back to "<=" Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 PDFium Authors. All rights reserved. 1 // Copyright 2015 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <cstring> 5 #include <cstring>
6 #include <string> 6 #include <string>
7 7
8 #include "../../../../testing/fx_string_testhelpers.h" 8 #include "../../../../testing/fx_string_testhelpers.h"
9 #include "../../../testing/embedder_test.h" 9 #include "../../../testing/embedder_test.h"
10 #include "core/include/fpdfapi/fpdf_parser.h" 10 #include "core/include/fpdfapi/fpdf_parser.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 unsigned int result_size; 88 unsigned int result_size;
89 FlateDecode(ptr->input, ptr->input_size, result, result_size); 89 FlateDecode(ptr->input, ptr->input_size, result, result_size);
90 ASSERT_TRUE(result); 90 ASSERT_TRUE(result);
91 EXPECT_EQ(std::string((const char*)ptr->expected, ptr->expected_size), 91 EXPECT_EQ(std::string((const char*)ptr->expected, ptr->expected_size),
92 std::string((const char*)result, result_size)) 92 std::string((const char*)result, result_size))
93 << " for case " << i; 93 << " for case " << i;
94 FX_Free(result); 94 FX_Free(result);
95 } 95 }
96 } 96 }
97 97
98 TEST_F(FPDFParserDecodeEmbeddertest, Bug_552046) {
99 // Tests specifying multiple image filters for a stream. Should not cause a
100 // crash when rendered.
101 EXPECT_TRUE(OpenDocument("bug_552046.pdf"));
102 FPDF_PAGE page = LoadPage(0);
103 FPDF_BITMAP bitmap = RenderPage(page);
104 FPDFBitmap_Destroy(bitmap);
105 UnloadPage(page);
106 }
107
98 #undef TEST_CASE 108 #undef TEST_CASE
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698