From 4022f87eb8716155291543efaaf289e51d7cbf43 Mon Sep 17 00:00:00 2001 From: tsepez Date: Mon, 23 Jan 2017 14:36:20 -0800 Subject: Update safe numerics package to get bitwise ops Fix callers conventions to avoid ambiguity. Fix bad bounds check unmasked by change. Directly include headers no longer pulled in by numerics itself. Review-Url: https://codereview.chromium.org/2640143003 --- core/fxcrt/fx_basic_array.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/fxcrt/fx_basic_array.cpp') diff --git a/core/fxcrt/fx_basic_array.cpp b/core/fxcrt/fx_basic_array.cpp index 92df0e00f8..83c981e9e7 100644 --- a/core/fxcrt/fx_basic_array.cpp +++ b/core/fxcrt/fx_basic_array.cpp @@ -33,7 +33,8 @@ bool CFX_BasicArray::SetSize(int nNewSize) { m_nSize = m_nMaxSize = 0; return false; } - m_pData = FX_Alloc(uint8_t, totalSize.ValueOrDie()); + m_pData = + FX_Alloc(uint8_t, pdfium::base::ValueOrDieForType(totalSize)); m_nSize = m_nMaxSize = nNewSize; } else if (nNewSize <= m_nMaxSize) { if (nNewSize > m_nSize) { @@ -48,7 +49,8 @@ bool CFX_BasicArray::SetSize(int nNewSize) { if (!totalSize.IsValid() || nNewMax < m_nSize) { return false; } - uint8_t* pNewData = FX_Realloc(uint8_t, m_pData, totalSize.ValueOrDie()); + uint8_t* pNewData = FX_Realloc( + uint8_t, m_pData, pdfium::base::ValueOrDieForType(totalSize)); if (!pNewData) { return false; } -- cgit v1.2.3