summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.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/fxbarcode/pdf417/BC_PDF417ErrorCorrection.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/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp')
-rw-r--r--xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp
index 0fd275c4e6..b0518c6f2c 100644
--- a/xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp
+++ b/xfa/src/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp
@@ -135,7 +135,7 @@ CFX_WideString CBC_PDF417ErrorCorrection::generateErrorCorrection(
int32_t& e) {
int32_t k = getErrorCorrectionCodewordCount(errorCorrectionLevel, e);
BC_EXCEPTION_CHECK_ReturnValue(e, (FX_WCHAR)' ');
- FX_WCHAR* ech = FX_Alloc(FX_WCHAR, k * sizeof(FX_WCHAR));
+ FX_WCHAR* ech = FX_Alloc(FX_WCHAR, k);
FXSYS_memset(ech, 0, k * sizeof(FX_WCHAR));
int32_t sld = dataCodewords.GetLength();
for (int32_t i = 0; i < sld; i++) {