summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-05-22 19:33:54 +0000
committerZachary Turner <zturner@google.com>2015-05-22 19:33:54 +0000
commit4f2a9726d4d1ed9f513926dc340b722978674e7b (patch)
treeee8f0d87db58a957ed86d42cf43d14b59c2d3b88
parent101a82bf8b4dd1860b0a56c15c6d0499b502fe03 (diff)
downloadbcm5719-llvm-4f2a9726d4d1ed9f513926dc340b722978674e7b.tar.gz
bcm5719-llvm-4f2a9726d4d1ed9f513926dc340b722978674e7b.zip
Fix use-after-free in OptionValueString.
We were assigning a temporary std::string to a StringRef. Somehow this worked on every platform but Windows. llvm-svn: 238041
-rw-r--r--lldb/source/Interpreter/OptionValueString.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/OptionValueString.cpp b/lldb/source/Interpreter/OptionValueString.cpp
index eb5b259348a..63f006e643f 100644
--- a/lldb/source/Interpreter/OptionValueString.cpp
+++ b/lldb/source/Interpreter/OptionValueString.cpp
@@ -70,7 +70,7 @@ OptionValueString::SetValueFromString (llvm::StringRef value,
error.SetErrorString("mismatched quotes");
return error;
}
- value = value.drop_front().drop_back().str();
+ value = value.drop_front().drop_back();
}
break;
}
OpenPOWER on IntegriCloud