mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
Allow files in LD_PRELOAD to be separated by white space, like Solaris
and Linux.
This commit is contained in:
parent
38b555fb1f
commit
924d965ba0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=56405
|
@ -1034,13 +1034,14 @@ static int
|
|||
load_preload_objects(void)
|
||||
{
|
||||
char *p = ld_preload;
|
||||
static const char delim[] = " \t:;";
|
||||
|
||||
if (p == NULL)
|
||||
return NULL;
|
||||
|
||||
p += strspn(p, ":;");
|
||||
p += strspn(p, delim);
|
||||
while (*p != '\0') {
|
||||
size_t len = strcspn(p, ":;");
|
||||
size_t len = strcspn(p, delim);
|
||||
char *path;
|
||||
char savech;
|
||||
|
||||
|
@ -1052,7 +1053,7 @@ load_preload_objects(void)
|
|||
return -1; /* XXX - cleanup */
|
||||
p[len] = savech;
|
||||
p += len;
|
||||
p += strspn(p, ":;");
|
||||
p += strspn(p, delim);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue