summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-05-23 10:07:03 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-23 10:07:03 -0700
commit885bba0b002e2a70e7808e65a53d6f977ddccd95 (patch)
tree7b42aa224a15dc91ed79cbe8da8fcca7d5c1ccbc /core/fpdfapi/fpdf_parser
parenta55880db9272d2ad98ce600efbf068408e8fcf15 (diff)
downloadpdfium-885bba0b002e2a70e7808e65a53d6f977ddccd95.tar.xz
Fix infinite recursion in CPDF_DocPageData::GetColorSpace().
BUG=pdfium:497 Review-Url: https://codereview.chromium.org/2003873002
Diffstat (limited to 'core/fpdfapi/fpdf_parser')
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_document.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fpdfapi/fpdf_parser/cpdf_document.cpp b/core/fpdfapi/fpdf_parser/cpdf_document.cpp
index 13d9737b5b..79965a23bb 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_document.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_document.cpp
@@ -394,9 +394,10 @@ int InsertDeletePDFPage(CPDF_Document* pDoc,
} else {
int nPages = pKid->GetIntegerBy("Count");
if (nPagesToGo < nPages) {
- if (pdfium::ContainsValue(*pVisited, pKid))
+ if (pdfium::ContainsKey(*pVisited, pKid))
return -1;
- pdfium::ScopedSetInsertion<CPDF_Dictionary*>(pVisited, pKid);
+
+ pdfium::ScopedSetInsertion<CPDF_Dictionary*> insertion(pVisited, pKid);
if (InsertDeletePDFPage(pDoc, pKid, nPagesToGo, pPage, bInsert,
pVisited) < 0) {
return -1;