From 25f0ce3cc763f721377eeec8866853894c1f1b41 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 18 Jun 2015 16:12:39 -0700 Subject: Merge to XFA: Fix CPDF_ICCBasedCS::GetDefaultValue heap-buffer-overflow. Original Review URL: https://codereview.chromium.org/1179773007. BUG=501889 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1180843012. --- core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'core') diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp index bcb6f4cb58..1146d76695 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp @@ -561,7 +561,6 @@ public: } ~CPDF_ICCBasedCS() override; - void GetDefaultValue(int i, FX_FLOAT& value, FX_FLOAT& min, FX_FLOAT& max) const override; FX_BOOL v_Load(CPDF_Document* pDoc, CPDF_Array* pArray) override; FX_BOOL GetRGB(FX_FLOAT* pBuf, FX_FLOAT& R, FX_FLOAT& G, FX_FLOAT& B) const override; FX_BOOL SetRGB(FX_FLOAT* pBuf, FX_FLOAT R, FX_FLOAT G, FX_FLOAT B) const override; @@ -593,13 +592,6 @@ CPDF_ICCBasedCS::~CPDF_ICCBasedCS() } } -void CPDF_ICCBasedCS::GetDefaultValue(int i, FX_FLOAT& value, FX_FLOAT& min, FX_FLOAT& max) const -{ - min = m_pRanges[i * 2]; - max = m_pRanges[i * 2 + 1]; - value = min; -} - FX_BOOL CPDF_ICCBasedCS::v_Load(CPDF_Document* pDoc, CPDF_Array* pArray) { CPDF_Stream* pStream = pArray->GetStream(1); @@ -772,7 +764,6 @@ public: ~CPDF_IndexedCS() override; FX_BOOL v_Load(CPDF_Document* pDoc, CPDF_Array* pArray) override; - void GetDefaultValue(int iComponent, FX_FLOAT& value, FX_FLOAT& min, FX_FLOAT& max) const override; FX_BOOL GetRGB(FX_FLOAT* pBuf, FX_FLOAT& R, FX_FLOAT& G, FX_FLOAT& B) const override; CPDF_ColorSpace* GetBaseCS() const override; void EnableStdConversion(FX_BOOL bEnabled) override; @@ -830,12 +821,6 @@ FX_BOOL CPDF_IndexedCS::v_Load(CPDF_Document* pDoc, CPDF_Array* pArray) } return TRUE; } -void CPDF_IndexedCS::GetDefaultValue(int iComponent, FX_FLOAT& value, FX_FLOAT& min, FX_FLOAT& max) const -{ - value = 0.0; - min = 0.0; - max = (FX_FLOAT)m_MaxIndex; -} FX_BOOL CPDF_IndexedCS::GetRGB(FX_FLOAT* pBuf, FX_FLOAT& R, FX_FLOAT& G, FX_FLOAT& B) const { -- cgit v1.2.3