summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-12-11 15:04:39 -0800
committerTom Sepez <tsepez@chromium.org>2015-12-11 15:04:39 -0800
commitcbbfc777b607324cd7d64cf3e1400d9312c8a709 (patch)
tree7b421f7d620f24774f33356ae6b0f9b9e46570b5
parentb2a4d4c0ef3d101f15d50dc46d6d10626f4359b8 (diff)
downloadpdfium-cbbfc777b607324cd7d64cf3e1400d9312c8a709.tar.xz
Fix size calculation in BC_QRCodeWriter.cpp
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1505353009 .
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRCodeWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCodeWriter.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCodeWriter.cpp
index 65891a5edb..2621abeb63 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCodeWriter.cpp
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCodeWriter.cpp
@@ -86,7 +86,7 @@ uint8_t* CBC_QRCodeWriter::Encode(const CFX_WideString& contents,
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
outWidth = qr.GetMatrixWidth();
outHeight = qr.GetMatrixWidth();
- uint8_t* result = FX_Alloc(uint8_t, outWidth * outWidth);
+ uint8_t* result = FX_Alloc2D(uint8_t, outWidth, outHeight);
FXSYS_memcpy(result, qr.GetMatrix()->GetArray(), outWidth * outHeight);
return result;
}