summaryrefslogtreecommitdiff
path: root/core/src/fxge/dib
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-05-18 14:29:22 -0700
committerTom Sepez <tsepez@chromium.org>2015-05-18 14:29:22 -0700
commit038cd084817aca8017255a6b3782fcba2688d2cb (patch)
tree2f6a4e2c6969139dedc64961102b0dc8d0b8661d /core/src/fxge/dib
parented099befbb300d6f9c393cb415fdb2a68c2ef471 (diff)
downloadpdfium-038cd084817aca8017255a6b3782fcba2688d2cb.tar.xz
Merge to XFA: Add safe FX_Alloc2D() macro
Original Review URL: https://codereview.chromium.org/1143663004 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1136673005
Diffstat (limited to 'core/src/fxge/dib')
-rw-r--r--core/src/fxge/dib/fx_dib_engine.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/src/fxge/dib/fx_dib_engine.cpp b/core/src/fxge/dib/fx_dib_engine.cpp
index 4d398d8c45..7b08386ae2 100644
--- a/core/src/fxge/dib/fx_dib_engine.cpp
+++ b/core/src/fxge/dib/fx_dib_engine.cpp
@@ -316,10 +316,7 @@ FX_BOOL CStretchEngine::StartStretchHorz()
return FALSE;
}
if (m_pSource && m_bHasAlpha && m_pSource->m_pAlphaMask) {
- m_pExtraAlphaBuf = FX_Alloc(unsigned char, m_SrcClip.Height() * m_ExtraMaskPitch);
- if (!m_pExtraAlphaBuf) {
- return FALSE;
- }
+ m_pExtraAlphaBuf = FX_Alloc2D(unsigned char, m_SrcClip.Height(), m_ExtraMaskPitch);
FX_DWORD size = (m_DestClip.Width() * 8 + 31) / 32 * 4;
m_pDestMaskScanline = FX_TryAlloc(unsigned char, size);
if (!m_pDestMaskScanline) {