diff options
author | Dan Gohman <gohman@apple.com> | 2009-03-06 18:13:15 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-03-06 18:13:15 +0000 |
commit | c7ffc9efd6b44de852e652abde23df746a1704e4 (patch) | |
tree | d60624a0e6e604075335eede3361d7c6a44f3424 | |
parent | 827632a569eb3e66ccd34f8e156c8db64441df0a (diff) | |
download | external_llvm-c7ffc9efd6b44de852e652abde23df746a1704e4.zip external_llvm-c7ffc9efd6b44de852e652abde23df746a1704e4.tar.gz external_llvm-c7ffc9efd6b44de852e652abde23df746a1704e4.tar.bz2 |
Use c_str() to force the string to be nul-terminated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66279 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Support/PrettyStackTrace.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/PrettyStackTrace.cpp b/lib/Support/PrettyStackTrace.cpp index 727f9a8..77ae584 100644 --- a/lib/Support/PrettyStackTrace.cpp +++ b/lib/Support/PrettyStackTrace.cpp @@ -66,7 +66,7 @@ static void CrashHandler(void *Cookie) { } if (!TmpStr.empty()) { - __crashreporter_info__ = strdup(&TmpStr[0]); + __crashreporter_info__ = strdup(TmpStr.c_str()); errs() << __crashreporter_info__; errs().flush(); } |