Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

fix(asan): heap-use-after-free caused by using string_view in fail_point #446

Merged
merged 2 commits into from
Apr 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/core/fail_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ bool fail_point::parse_from_string(string_view action)
}

sub_match = match[3];
string_view task_type = sub_match.str();
std::string task_type = sub_match.str();
if (task_type.compare("off") == 0) {
_task = Off;
} else if (task_type.compare("return") == 0) {
Expand Down