commit | ec5f2b5e050ff28458c9cc33ad2e740e838e6756 | [log] [tgz] |
---|---|---|
author | Dan Gohman <gohman@apple.com> | Fri Mar 06 18:13:15 2009 +0000 |
committer | Dan Gohman <gohman@apple.com> | Fri Mar 06 18:13:15 2009 +0000 |
tree | 699ceaa291362d2222c14de9858d3067ba51d3ff | |
parent | 211f3c0f97752df1183e5edd471d20e83007ae55 [diff] [blame] |
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(); }