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

Unified Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp

Issue 662063003: Change the clear order of pDocPage and pDocRender (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 2 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/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
index 635fc6b0ee3794da98890244d159f3701ad62ce1..c3e35d882db281a7a4f4e0e9f5f4f4bf68481acc 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
@@ -95,13 +95,13 @@ void CPDF_Document::LoadPages()
extern void FPDF_TTFaceMapper_ReleaseDoc(CPDF_Document*);
CPDF_Document::~CPDF_Document()
{
- if (m_pDocRender) {
- CPDF_ModuleMgr::Get()->GetRenderModule()->DestroyDocData(m_pDocRender);
- }
if (m_pDocPage) {
CPDF_ModuleMgr::Get()->GetPageModule()->ReleaseDoc(this);
CPDF_ModuleMgr::Get()->GetPageModule()->ClearStockFont(this);
}
+ if (m_pDocRender) {
Tom Sepez 2014/10/21 21:05:29 Are you sure this doesn't introduce new UAFs from
Bo Xu 2014/10/21 21:19:42 Hi Tom, I have the same question and checked the d
+ CPDF_ModuleMgr::Get()->GetRenderModule()->DestroyDocData(m_pDocRender);
+ }
}
#define FX_MAX_PAGE_LEVEL 1024
CPDF_Dictionary* CPDF_Document::_FindPDFPage(CPDF_Dictionary* pPages, int iPage, int nPagesToGo, int level)
« 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