Skip to content

Commit

Permalink
Remove unnecessary and dangerous path string parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Newton committed Oct 18, 2023
1 parent 835e6ab commit 8e9a985
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cpp/src/arrow/filesystem/azurefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ struct AzurePath {
"Expected an Azure object path of the form 'container/path...', got a URI: '",
s, "'");
}
auto src = internal::RemoveTrailingSlash(s);
auto input_path = std::string(src.data());
src = internal::RemoveLeadingSlash(src);
const auto src = internal::RemoveTrailingSlash(s);
auto first_sep = src.find_first_of(internal::kSep);
if (first_sep == 0) {
return Status::Invalid("Path cannot start with a separator ('", s, "')");
Expand Down

0 comments on commit 8e9a985

Please sign in to comment.