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

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_array_unittest.cpp

Issue 2250533002: Fix stack overflow in object Clone() functions (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase again Created 4 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_array.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_boolean.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/cpdf_array_unittest.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_array_unittest.cpp b/core/fpdfapi/fpdf_parser/cpdf_array_unittest.cpp
index efad3c38f65de0e11fda489460b3ccb1f4cf8490..41a49cadaba69fb501d0dc7955862c1f15cc571e 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_array_unittest.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_array_unittest.cpp
@@ -125,10 +125,10 @@ TEST(cpdf_array, Clone) {
ASSERT_EQ(kNumOfRows, arr->GetCount());
// Not dereferencing reference objects means just creating new references
// instead of new copies of direct objects.
- ScopedArray arr1(arr->Clone(FALSE)->AsArray());
+ ScopedArray arr1(arr->Clone()->AsArray());
EXPECT_EQ(arr->GetCount(), arr1->GetCount());
// Dereferencing reference objects creates new copies of direct objects.
- ScopedArray arr2(arr->Clone(TRUE)->AsArray());
+ ScopedArray arr2(arr->CloneDirectObject()->AsArray());
EXPECT_EQ(arr->GetCount(), arr2->GetCount());
for (size_t i = 0; i < kNumOfRows; ++i) {
CPDF_Array* arr_elem = arr->GetObjectAt(i)->AsArray();
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_array.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_boolean.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698