Use c_str() to force the string to be nul-terminated.

llvm-svn: 66279
diff --git a/llvm/lib/Support/PrettyStackTrace.cpp b/llvm/lib/Support/PrettyStackTrace.cpp
index 727f9a8..77ae584 100644
--- a/llvm/lib/Support/PrettyStackTrace.cpp
+++ b/llvm/lib/Support/PrettyStackTrace.cpp
@@ -66,7 +66,7 @@
   }
   
   if (!TmpStr.empty()) {
-    __crashreporter_info__ = strdup(&TmpStr[0]);
+    __crashreporter_info__ = strdup(TmpStr.c_str());
     errs() << __crashreporter_info__;
     errs().flush();
   }