diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-04-10 14:54:13 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-04-10 14:54:13 -0700 |
commit | 73fb6be8290a20dbccc40de328e7860f721966c6 (patch) | |
tree | d96a737f4ff36bfa40307c2d96ce3986971227dd /core/src/fxcrt/fx_basic_wstring.cpp | |
parent | b739aab3e0345afc22c325ed62e226df6b1e3965 (diff) | |
download | pdfium-73fb6be8290a20dbccc40de328e7860f721966c6.tar.xz |
Merge to XFA: Better fix for snprintf non-termination on windows.
TBR=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1073313003
Diffstat (limited to 'core/src/fxcrt/fx_basic_wstring.cpp')
-rw-r--r-- | core/src/fxcrt/fx_basic_wstring.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/fxcrt/fx_basic_wstring.cpp b/core/src/fxcrt/fx_basic_wstring.cpp index ce6a1cd763..dfdbef8bd6 100644 --- a/core/src/fxcrt/fx_basic_wstring.cpp +++ b/core/src/fxcrt/fx_basic_wstring.cpp @@ -976,9 +976,9 @@ void CFX_WideString::FormatV(FX_LPCWSTR lpszFormat, va_list argList) nItemLen = nPrecision + nWidth + 128; } else { double f; - char pszTemp[256] = {0}; + char pszTemp[256]; f = va_arg(argList, double); - FXSYS_snprintf(pszTemp, sizeof(pszTemp) - 1, "%*.*f", nWidth, nPrecision + 6, f ); + FXSYS_snprintf(pszTemp, sizeof(pszTemp), "%*.*f", nWidth, nPrecision + 6, f ); nItemLen = (FX_STRSIZE)FXSYS_strlen(pszTemp); } break; |