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

Unified Diff: core/include/fpdfapi/fpdf_resource.h

Issue 439693002: Fix use-after-free in CPDF_Color::~CPDF_Color (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 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
Index: core/include/fpdfapi/fpdf_resource.h
diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h
index 7e9e4123251d1c3ccdc706b6930d93cd808b0569..a6eedc166c2c87cf568a4b034cb7d3cac9d173df 100644
--- a/core/include/fpdfapi/fpdf_resource.h
+++ b/core/include/fpdfapi/fpdf_resource.h
@@ -731,16 +731,18 @@ class CPDF_Pattern : public CFX_Object
{
public:
Tom Sepez 2014/08/04 18:02:32 Too bad this doesn't have a constructor to set up
palmer 2014/08/04 18:17:11 We need to start making sure every class and struc
jun_fang 2014/08/04 18:37:11 This class is a interface class. It doesn't need t
- virtual ~CPDF_Pattern() {}
+ virtual ~CPDF_Pattern();
+ void SaveColor(CPDF_Color* pColor) {m_pColor = pColor;}
- CPDF_Object* m_pPatternObj;
+ CPDF_Object* m_pPatternObj;
- int m_PatternType;
+ int m_PatternType;
- CFX_AffineMatrix m_Pattern2Form;
- CFX_AffineMatrix m_ParentMatrix;
+ CFX_AffineMatrix m_Pattern2Form;
+ CFX_AffineMatrix m_ParentMatrix;
- CPDF_Document* m_pDocument;
+ CPDF_Document* m_pDocument;
+ CPDF_Color* m_pColor;
protected:
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp » ('j') | core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698