summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_basic_wstring.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-03-29 15:02:46 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-03-30 01:01:22 +0000
commitd40fea23a884ca16192f8d58ffc5cce78ffc7b0a (patch)
treefd4bb6ada5523f074cebb56154663831cc82f410 /core/fxcrt/fx_basic_wstring.cpp
parentd5d8f606d98d9df959bf2fc308979471bddda8c1 (diff)
downloadpdfium-d40fea23a884ca16192f8d58ffc5cce78ffc7b0a.tar.xz
Account for character size in last CFX_WideString patch.
Change-Id: Ic3a72eb73afe86624dea406948b95dea70192e47 Reviewed-on: https://pdfium-review.googlesource.com/3296 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_basic_wstring.cpp')
-rw-r--r--core/fxcrt/fx_basic_wstring.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fxcrt/fx_basic_wstring.cpp b/core/fxcrt/fx_basic_wstring.cpp
index 5c0b6ce061..81f463cc8e 100644
--- a/core/fxcrt/fx_basic_wstring.cpp
+++ b/core/fxcrt/fx_basic_wstring.cpp
@@ -613,7 +613,7 @@ void CFX_WideString::FormatV(const wchar_t* pFormat, va_list argList) {
// -1 return code even though the buffer is written. Probably just as well
// not to trust the vendor's implementation to write anything anyways.
// See https://crbug.com/705912.
- memset(m_pData->m_String, 0, nMaxLen + 1);
+ memset(m_pData->m_String, 0, (nMaxLen + 1) * sizeof(wchar_t));
FXSYS_vswprintf((wchar_t*)m_pData->m_String, nMaxLen + 1,
(const wchar_t*)pFormat, argListSave);
ReleaseBuffer();