Skip to content

Commit

Permalink
fix(asan): heap-use-after-free caused by using string_view in fail_po…
Browse files Browse the repository at this point in the history
…int (#446)
  • Loading branch information
foreverneverer authored Apr 23, 2020
1 parent a0ecf81 commit 52bf975
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 52bf975

Please sign in to comment.