From aa23c864b84d99f23a82ee8da852e575db981c07 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 18 Jun 2015 15:58:26 -0700 Subject: Fix CPDF_ICCBasedCS::GetDefaultValue heap-buffer-overflow. Introduced in ea44bd0. Re-animating the dead (code) usually turns out badly, and this is no exception. Make both of the uncallable methods go away. BUG=501889 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1179773007. --- core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'core/src') 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