From ded79a2f8a509adc21834b95a9892073d4a91fdc Mon Sep 17 00:00:00 2001 From: Ryan Gonzalez Date: Fri, 21 Jul 2023 18:07:41 -0500 Subject: [PATCH] helper: Fix relative binary paths triggering PATH lookups Signed-off-by: Ryan Gonzalez --- src/helper/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helper/main.cc b/src/helper/main.cc index b152e87..ac99fb5 100644 --- a/src/helper/main.cc +++ b/src/helper/main.cc @@ -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;