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

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

Issue 2361303002: Avoid collisions in CPDF_IndirectObjectHolder::AddIndirectObject() (Closed)
Patch Set: back to old solution. Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.cpp b/core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.cpp
index 800e34b3d1eb62f3a1de4c4fc27c6a5727bc702a..0a15e2dce1c92255ac56438e3cd68f45f1b74f9f 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.cpp
@@ -47,6 +47,7 @@ uint32_t CPDF_IndirectObjectHolder::AddIndirectObject(CPDF_Object* pObj) {
return pObj->m_ObjNum;
m_LastObjNum++;
+ m_IndirectObjs[m_LastObjNum].release(); // TODO(tsepez): stop this leak.
m_IndirectObjs[m_LastObjNum].reset(pObj);
pObj->m_ObjNum = m_LastObjNum;
return m_LastObjNum;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698