Fix LD_LIBMAP.
The r232862 passed the pointer to end of string to lmc_parse() and free(). Submitted by: Wolfgang Jenkner <wjenkner@inode.at> MFC after: 1 week
This commit is contained in:
parent
1cb3ec2eb7
commit
490c68de98
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=266411
@ -80,7 +80,7 @@ lm_init(char *libmap_override)
|
||||
|
||||
if (libmap_override) {
|
||||
/*
|
||||
* Do some character replacement to make $LIBMAP look
|
||||
* Do some character replacement to make $LDLIBMAP look
|
||||
* like a text file, then parse it.
|
||||
*/
|
||||
libmap_override = xstrdup(libmap_override);
|
||||
@ -94,8 +94,8 @@ lm_init(char *libmap_override)
|
||||
break;
|
||||
}
|
||||
}
|
||||
lmc_parse(p, strlen(p));
|
||||
free(p);
|
||||
lmc_parse(libmap_override, p - libmap_override);
|
||||
free(libmap_override);
|
||||
}
|
||||
|
||||
return (lm_count == 0);
|
||||
|
Loading…
Reference in New Issue
Block a user