diff options
author | Chris Palmer <palmer@google.com> | 2014-07-23 15:00:32 -0700 |
---|---|---|
committer | Chris Palmer <palmer@google.com> | 2014-07-23 15:00:32 -0700 |
commit | a08cf99d066b16e4e16393efc15174193e002371 (patch) | |
tree | 8199f4122d1bdb2ca7211eb817002e97e11ee251 /core/src/fxcrt/extension.h | |
parent | 141d61d1f6255923f46b6f0b97614e27c9c4dc86 (diff) | |
download | pdfium-a08cf99d066b16e4e16393efc15174193e002371.tar.xz |
Refactor CFX_BasicArray.chromium/2112chromium/2111chromium/2110chromium/2109chromium/2108chromium/2107chromium/2106chromium/2105chromium/2104
The |nGrowBy| argument to |SetSize| was always -1, which caused the
effective m_nGrowBy value to always be its default value: 0. So it was not
needed, and was cluttering up the logic.
BUG=384662
Check for integer overflow in CFX_BasicArray.
BUG=384662
R=bo_xu@foxitsoftware.com, rsesek@chromium.org
Review URL: https://codereview.chromium.org/415803002
Diffstat (limited to 'core/src/fxcrt/extension.h')
-rw-r--r-- | core/src/fxcrt/extension.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/fxcrt/extension.h b/core/src/fxcrt/extension.h index a736425d57..a2d0a1462f 100644 --- a/core/src/fxcrt/extension.h +++ b/core/src/fxcrt/extension.h @@ -358,7 +358,7 @@ protected: } FX_INT32 iCount = m_Blocks.GetSize(); size = (size - m_nTotalSize + m_nGrowSize - 1) / m_nGrowSize; - m_Blocks.SetSize(m_Blocks.GetSize() + (FX_INT32)size, -1); + m_Blocks.SetSize(m_Blocks.GetSize() + (FX_INT32)size); while (size --) { FX_LPBYTE pBlock = FX_Alloc(FX_BYTE, m_nGrowSize); if (!pBlock) { |