[llvm-commits] [llvm] r159103 - /llvm/trunk/lib/Support/Errno.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Sat Jun 23 20:51:04 PDT 2012
Author: chapuni
Date: Sat Jun 23 22:51:04 2012
New Revision: 159103
URL: http://llvm.org/viewvc/llvm-project?rev=159103&view=rev
Log:
llvm/lib/Support/Errno.cpp: [Win32] Fix usage of strerror_s().
FYI, two arguments of strerror_s() is provided in C++ on msvc.
Modified:
llvm/trunk/lib/Support/Errno.cpp
Modified: llvm/trunk/lib/Support/Errno.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Errno.cpp?rev=159103&r1=159102&r2=159103&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Errno.cpp (original)
+++ llvm/trunk/lib/Support/Errno.cpp Sat Jun 23 22:51:04 2012
@@ -52,7 +52,7 @@
# 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
More information about the llvm-commits
mailing list