[mingw-llvm] Add upstream patch to fix problem with insufficient args to strerror_s(), which started appearing in

Eric Smith brouhaha at fedoraproject.org
Wed Jul 11 07:48:16 UTC 2012


commit b9735697550c60508a28bfd465f551cc07d1b53a
Author: Eric Smith <eric at brouhaha.com>
Date:   Wed Jul 11 01:47:41 2012 -0600

    Add upstream patch to fix problem with insufficient args to strerror_s(), which started appearing in rawhide recently.

 mingw-llvm-3.0-strerror_s.patch |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/mingw-llvm-3.0-strerror_s.patch b/mingw-llvm-3.0-strerror_s.patch
new file mode 100644
index 0000000..42a7556
--- /dev/null
+++ b/mingw-llvm-3.0-strerror_s.patch
@@ -0,0 +1,12 @@
+diff -up llvm-3.0.src/lib/Support/Errno.cpp.strerror_s llvm-3.0.src/lib/Support/Errno.cpp
+--- llvm-3.0.src/lib/Support/Errno.cpp.strerror_s	2012-07-11 01:36:04.995712522 -0600
++++ llvm-3.0.src/lib/Support/Errno.cpp	2012-07-11 01:36:44.704709252 -0600
+@@ -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


More information about the scm-commits mailing list