From cbbfc777b607324cd7d64cf3e1400d9312c8a709 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 11 Dec 2015 15:04:39 -0800 Subject: Fix size calculation in BC_QRCodeWriter.cpp R=thestig@chromium.org Review URL: https://codereview.chromium.org/1505353009 . --- xfa/src/fxbarcode/qrcode/BC_QRCodeWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xfa') 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; } -- cgit v1.2.3