diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-12-11 15:04:39 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-12-11 15:04:39 -0800 |
commit | cbbfc777b607324cd7d64cf3e1400d9312c8a709 (patch) | |
tree | 7b421f7d620f24774f33356ae6b0f9b9e46570b5 /xfa/src | |
parent | b2a4d4c0ef3d101f15d50dc46d6d10626f4359b8 (diff) | |
download | pdfium-cbbfc777b607324cd7d64cf3e1400d9312c8a709.tar.xz |
Fix size calculation in BC_QRCodeWriter.cpp
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1505353009 .
Diffstat (limited to 'xfa/src')
-rw-r--r-- | xfa/src/fxbarcode/qrcode/BC_QRCodeWriter.cpp | 2 |
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;
}
|