[Lldb-commits] [lldb] r238041 - Fix use-after-free in OptionValueString.
Zachary Turner
zturner at google.com
Fri May 22 12:33:54 PDT 2015
Author: zturner
Date: Fri May 22 14:33:54 2015
New Revision: 238041
URL: http://llvm.org/viewvc/llvm-project?rev=238041&view=rev
Log:
Fix use-after-free in OptionValueString.
We were assigning a temporary std::string to a StringRef. Somehow
this worked on every platform but Windows.
Modified:
lldb/trunk/source/Interpreter/OptionValueString.cpp
Modified: lldb/trunk/source/Interpreter/OptionValueString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueString.cpp?rev=238041&r1=238040&r2=238041&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionValueString.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionValueString.cpp Fri May 22 14:33:54 2015
@@ -70,7 +70,7 @@ OptionValueString::SetValueFromString (l
error.SetErrorString("mismatched quotes");
return error;
}
- value = value.drop_front().drop_back().str();
+ value = value.drop_front().drop_back();
}
break;
}
More information about the lldb-commits
mailing list