diff options
author | thestig <thestig@chromium.org> | 2016-05-23 10:07:03 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-23 10:07:03 -0700 |
commit | 885bba0b002e2a70e7808e65a53d6f977ddccd95 (patch) | |
tree | 7b42aa224a15dc91ed79cbe8da8fcca7d5c1ccbc /core/fpdfapi/fpdf_parser | |
parent | a55880db9272d2ad98ce600efbf068408e8fcf15 (diff) | |
download | pdfium-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.cpp | 5 |
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; |