[haiku-commits] haiku: hrev53052 - src/system/runtime_loader

  • From: François Revol <revol@xxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 8 Apr 2019 17:52:52 -0400 (EDT)

hrev53052 adds 1 changeset to branch 'master'
old head: 4e8ff93e77e70c64d4e41659319efcb7cad65067
new head: 80934b83954766f4affb7aabaf371e5508abc7df
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=80934b839547+%5E4e8ff93e77e7

----------------------------------------------------------------------------

80934b839547: runtime_loader: Fix handling of #!/usr/bin/* introduced in 
hrev53048
  
  Code was comparing "/usr/bin/" with "/usr/bin/env" of whatever was
  passed. We now only compare the substring.
  
  Change-Id: I0d09589fa83227d88fc8ba458eaf4293e86a041b

                                          [ François Revol <revol@xxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53052
Commit:      80934b83954766f4affb7aabaf371e5508abc7df
URL:         https://git.haiku-os.org/haiku/commit/?id=80934b839547
Author:      François Revol <revol@xxxxxxx>
Date:        Mon Apr  8 21:50:33 2019 UTC

----------------------------------------------------------------------------

1 file changed, 1 insertion(+), 1 deletion(-)
src/system/runtime_loader/runtime_loader.cpp | 2 +-

----------------------------------------------------------------------------

diff --git a/src/system/runtime_loader/runtime_loader.cpp 
b/src/system/runtime_loader/runtime_loader.cpp
index 0ab78187db..b71a6dfc50 100644
--- a/src/system/runtime_loader/runtime_loader.cpp
+++ b/src/system/runtime_loader/runtime_loader.cpp
@@ -362,7 +362,7 @@ fixup_shebang(char *invoker)
        }
 
        // replace /usr/bin/ with /bin/
-       if (memcmp(commandStart, "/usr/bin/", current - commandStart) == 0)
+       if (memcmp(commandStart, "/usr/bin/", strlen("/usr/bin/")) == 0)
                memmove(commandStart, commandStart + 4, strlen(commandStart + 
4) + 1);
 }
 


Other related posts:

  • » [haiku-commits] haiku: hrev53052 - src/system/runtime_loader - François Revol