summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/extension.h
diff options
context:
space:
mode:
authorChris Palmer <palmer@google.com>2014-07-23 15:00:32 -0700
committerChris Palmer <palmer@google.com>2014-07-23 15:00:32 -0700
commita08cf99d066b16e4e16393efc15174193e002371 (patch)
tree8199f4122d1bdb2ca7211eb817002e97e11ee251 /core/src/fxcrt/extension.h
parent141d61d1f6255923f46b6f0b97614e27c9c4dc86 (diff)
downloadpdfium-a08cf99d066b16e4e16393efc15174193e002371.tar.xz
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.h2
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) {