diff options
author | kib <kib@FreeBSD.org> | 2014-05-18 17:14:08 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-05-18 17:14:08 +0000 |
commit | e860f4779d09166ec13c90de502a34656691699b (patch) | |
tree | 4fa0a640930ead0ed447c19d01a27e556f890b62 /libexec | |
parent | 8d108289960d5297e7df507512344a07b0768995 (diff) | |
download | FreeBSD-src-e860f4779d09166ec13c90de502a34656691699b.zip FreeBSD-src-e860f4779d09166ec13c90de502a34656691699b.tar.gz |
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
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/rtld-elf/libmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/rtld-elf/libmap.c b/libexec/rtld-elf/libmap.c index 2e1f3c6..8b5faf8 100644 --- a/libexec/rtld-elf/libmap.c +++ b/libexec/rtld-elf/libmap.c @@ -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); |