diff options
author | tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-07-08 17:49:22 +0000 |
---|---|---|
committer | tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-07-08 17:49:22 +0000 |
commit | 47e0a09052eb4c93a4506ebf3c64070fafc3d4b3 (patch) | |
tree | e9f7be606c243a90b9a6a5df49cdc6cd851e60fa /src/core | |
parent | cd9cfd7de39f8e7696cdb6b72931294d9da7839f (diff) |
Replace vsnprintf with vsnprintf_s; add code to reproduce issue to StringTest;
fix another Windows test failure.
git-svn-id: http://skia.googlecode.com/svn/trunk@1829 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkString.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp index 0d7defec8a..c8e570bee1 100644 --- a/src/core/SkString.cpp +++ b/src/core/SkString.cpp @@ -25,7 +25,8 @@ static const size_t kBufferSize = 256; #ifdef SK_BUILD_FOR_WIN - #define VSNPRINTF _vsnprintf + #define VSNPRINTF(buffer, size, format, args) \ + _vsnprintf_s(buffer, size, _TRUNCATE, format, args) #define SNPRINTF _snprintf #else #define VSNPRINTF vsnprintf @@ -615,4 +616,5 @@ SkString SkStringPrintf(const char* format, ...) { } #undef VSNPRINTF +#undef SNPRINTF |