diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-03-29 15:02:46 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-30 01:01:22 +0000 |
commit | d40fea23a884ca16192f8d58ffc5cce78ffc7b0a (patch) | |
tree | fd4bb6ada5523f074cebb56154663831cc82f410 /core/fxcrt/fx_basic_wstring.cpp | |
parent | d5d8f606d98d9df959bf2fc308979471bddda8c1 (diff) | |
download | pdfium-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.cpp | 2 |
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(); |