mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 07:01:03 +08:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user