]> granicus.if.org Git - musl/commitdiff
make dynamic linker accept colon as a separator for LD_PRELOAD
authorRich Felker <dalias@aerifal.cx>
Fri, 11 Jul 2014 04:26:12 +0000 (00:26 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 28 Jul 2014 04:27:59 +0000 (00:27 -0400)
(cherry picked from commit 349381aa8c0fc385e54e1068dd5f2b27af55cd12)

src/ldso/dynlink.c

index a1bdf0fb1b3182494abef08e4f57aa096ed323cd..6d265b354301fbc132291477b63b642e849e6aa3 100644 (file)
@@ -737,8 +737,8 @@ static void load_preload(char *s)
        int tmp;
        char *z;
        for (z=s; *z; s=z) {
-               for (   ; *s && isspace(*s); s++);
-               for (z=s; *z && !isspace(*z); z++);
+               for (   ; *s && (isspace(*s) || *s==':'); s++);
+               for (z=s; *z && !isspace(*z) && *z!=':'; z++);
                tmp = *z;
                *z = 0;
                load_library(s, 0);