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
This commit is contained in:
Dan Gohman 2009-03-06 18:13:15 +00:00
parent 827632a569
commit c7ffc9efd6

View File

@ -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();
}