Hardened LLDB against NULL conditions being
passed to breakpoints. <rdar://problem/13853205> llvm-svn: 181636
This commit is contained in:
parent
d7193795bd
commit
ec537a24eb
|
@ -254,7 +254,10 @@ BreakpointLocation::ConditionSaysStop (ExecutionContext &exe_ctx, Error &error)
|
|||
const char *condition_text = GetConditionText(&condition_hash);
|
||||
|
||||
if (!condition_text)
|
||||
{
|
||||
m_user_expression_sp.reset();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (condition_hash != m_condition_hash ||
|
||||
!m_user_expression_sp ||
|
||||
|
|
|
@ -162,6 +162,9 @@ BreakpointOptions::HasCallback ()
|
|||
void
|
||||
BreakpointOptions::SetCondition (const char *condition)
|
||||
{
|
||||
if (!condition)
|
||||
condition = "";
|
||||
|
||||
m_condition_text.assign(condition);
|
||||
std::hash<std::string> hasher;
|
||||
m_condition_text_hash = hasher(m_condition_text);
|
||||
|
|
Loading…
Reference in New Issue