Skip to content

Commit

Permalink
helper: Fix relative binary paths triggering PATH lookups
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Gonzalez <[email protected]>
  • Loading branch information
refi64 committed Jul 21, 2023
1 parent c7daf0c commit ded79a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helper/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ std::string GetPreload(std::string_view mode, std::string_view libdir) {
bool LooksLikeElfFile(cstring_view target) {
unique_fd target_fd;

if (target.starts_with("/")) {
if (target.find("/") != cstring_view::npos) {
target_fd = open(target.c_str(), O_RDONLY);
if (target_fd.invalid()) {
return false;
Expand Down

0 comments on commit ded79a2

Please sign in to comment.