[llvm-commits] [llvm] r66279 - /llvm/trunk/lib/Support/PrettyStackTrace.cpp

Dan Gohman gohman at apple.com
Fri Mar 6 10:13:16 PST 2009


Author: djg
Date: Fri Mar  6 12:13:15 2009
New Revision: 66279

URL: http://llvm.org/viewvc/llvm-project?rev=66279&view=rev
Log:
Use c_str() to force the string to be nul-terminated.

Modified:
    llvm/trunk/lib/Support/PrettyStackTrace.cpp

Modified: llvm/trunk/lib/Support/PrettyStackTrace.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/PrettyStackTrace.cpp?rev=66279&r1=66278&r2=66279&view=diff

==============================================================================
--- llvm/trunk/lib/Support/PrettyStackTrace.cpp (original)
+++ llvm/trunk/lib/Support/PrettyStackTrace.cpp Fri Mar  6 12:13:15 2009
@@ -66,7 +66,7 @@
   }
   
   if (!TmpStr.empty()) {
-    __crashreporter_info__ = strdup(&TmpStr[0]);
+    __crashreporter_info__ = strdup(TmpStr.c_str());
     errs() << __crashreporter_info__;
     errs().flush();
   }





More information about the llvm-commits mailing list