summaryrefslogtreecommitdiff
path: root/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-12-11 16:26:00 -0800
committerTom Sepez <tsepez@chromium.org>2015-12-11 16:26:00 -0800
commitf75bdb181576e4a4cf8291706a0db86c687e5fc3 (patch)
tree4440158d95c723b1ef02753b4dfa9d1a598e1a87 /xfa/src/fxfa/src/app/xfa_ffwidget.cpp
parent74aa4e19a332436ff3bcf539c905e992b1d3ac4e (diff)
downloadpdfium-f75bdb181576e4a4cf8291706a0db86c687e5fc3.tar.xz
XFA: avoid multiplications in FX_Allocs
In some cases, we can use the safe FX_Alloc2D, in others there's an extra multiplication by the size of the type. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1519233002 .
Diffstat (limited to 'xfa/src/fxfa/src/app/xfa_ffwidget.cpp')
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
index 801c66a8bc..a4015abe62 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
@@ -903,7 +903,7 @@ FX_CHAR* XFA_Base64Encode(const uint8_t* buf, int32_t buf_len) {
FX_CHAR* out = NULL;
int i, j;
FX_DWORD limb;
- out = (FX_CHAR*)FX_Alloc(FX_CHAR, ((buf_len * 8 + 5) / 6) + 5);
+ out = FX_Alloc(FX_CHAR, ((buf_len * 8 + 5) / 6) + 5);
for (i = 0, j = 0, limb = 0; i + 2 < buf_len; i += 3, j += 4) {
limb = ((FX_DWORD)buf[i] << 16) | ((FX_DWORD)buf[i + 1] << 8) |
((FX_DWORD)buf[i + 2]);