diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-06-18 15:58:26 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-06-18 15:58:26 -0700 |
commit | aa23c864b84d99f23a82ee8da852e575db981c07 (patch) | |
tree | 6f5e11ff60f1270fee5d051ced395cc3a12a9c57 /core | |
parent | fe85afa303449e70a607bbf8458bd816725e25d2 (diff) | |
download | pdfium-aa23c864b84d99f23a82ee8da852e575db981c07.tar.xz |
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.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
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 { |