diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2014-07-08 15:30:46 -0700 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2014-07-08 15:30:46 -0700 |
commit | 3522876d5291922ddc62bf1b70d02743b0850673 (patch) | |
tree | b3fd7eda6e8ed8f07674f6a6fba21e82ca83bee7 /core/src/fpdfapi/fpdf_edit | |
parent | e7ee98e4c6fd56c9e930194e9fc11cc10e8293a1 (diff) | |
download | pdfium-3522876d5291922ddc62bf1b70d02743b0850673.tar.xz |
Remove custom memory manager
BUG=
R=palmer@chromium.org
Review URL: https://codereview.chromium.org/372473003
Diffstat (limited to 'core/src/fpdfapi/fpdf_edit')
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp index 2672116e4f..9985f06dc6 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp @@ -543,8 +543,7 @@ static void _CFString2CFXByteString(CFStringRef src, CFX_ByteString &dest) SInt32 len = CFStringGetLength(src); CFRange range = CFRangeMake(0, len); CFIndex used = 0; - UInt8* pBuffer = (UInt8*)malloc(sizeof(UInt8) * (len + 1)); - FXSYS_memset32(pBuffer, 0, sizeof(UInt8) * (len + 1)); + UInt8* pBuffer = (UInt8*)calloc(len+1, sizeof(UInt8)); CFStringGetBytes(src, range, kCFStringEncodingASCII, 0, false, pBuffer, len, &used); dest = (FX_LPSTR)pBuffer; free(pBuffer); |