diff options
| author | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-06-24 03:51:04 +0000 |
|---|---|---|
| committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-06-24 03:51:04 +0000 |
| commit | 33f2139585cfb56cbc3f83f57122b41e1b261270 (patch) | |
| tree | 23e1f178b7541266b1efe2f146c8d735780e1f3e /lib/Support/Errno.cpp | |
| parent | b253451b821a3e487b3565901064fa9ced77db87 (diff) | |
llvm/lib/Support/Errno.cpp: [Win32] Fix usage of strerror_s().
FYI, two arguments of strerror_s() is provided in C++ on msvc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159103 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Errno.cpp')
| -rw-r--r-- | lib/Support/Errno.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/Errno.cpp b/lib/Support/Errno.cpp index 18c658173a..dd218f6099 100644 --- a/lib/Support/Errno.cpp +++ b/lib/Support/Errno.cpp @@ -52,7 +52,7 @@ std::string StrError(int errnum) { # endif #elif HAVE_DECL_STRERROR_S // "Windows Secure API" if (errnum) - strerror_s(buffer, errnum); + strerror_s(buffer, MaxErrStrLen - 1, errnum); #elif defined(HAVE_STRERROR) // Copy the thread un-safe result of strerror into // the buffer as fast as possible to minimize impact |
