1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00
freebsd/libexec/rtld-elf
Konstantin Belousov 32e1d8010b The origin_subst_one() function limits the length of the string to
PATH_MAX after the token substitution.  This is wrong, because
origin_subst_one() performs the substitution on the whole rpath and
similar strings, which contain several pathes separated by colon.  As
result, long (but correct) rpath consisting of many path elements is
rejected by the function.

Correct the problem by rewriting the origin_subst_one() to perform two
passes, first pass to calculate the number of substitutions to be
performed, and second pass to generate the resulting string.  Second
pass allocates the memory for the result based on the count from the
first pass, without enforcing a limit.

Reported and tested by:	pgj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2013-04-15 20:06:56 +00:00
..
amd64 Add GNU hash support for rtld. 2012-04-30 13:31:10 +00:00
arm Merging of projects/armv6, part 2 2012-08-15 03:07:41 +00:00
i386 Add GNU hash support for rtld. 2012-04-30 13:31:10 +00:00
ia64 Add GNU hash support for rtld. 2012-04-30 13:31:10 +00:00
mips Before jumping to application's entry point set ra == pc in order 2012-03-23 17:54:06 +00:00
powerpc Add GNU hash support for rtld. 2012-04-30 13:31:10 +00:00
powerpc64 Avoid use of register variables, which some compilers (e.g. clang) 2013-02-08 17:44:44 +00:00
sparc64 Add GNU hash support for rtld. 2012-04-30 13:31:10 +00:00
debug.c
debug.h
libmap.c rtld: Fix fd leak with parallel dlopen and fork/exec. 2012-11-04 21:42:24 +00:00
libmap.h
Makefile When building for ARM EABI link against libgcc for the __aeabi_* functions. 2013-01-19 04:34:33 +00:00
malloc.c Remove the fragments which are not needed on FreeBSD. The caltech 2012-03-22 14:11:10 +00:00
map_object.c Map libraries linked with -Ttext-segment=base_addr at base_addr. 2013-02-27 09:34:09 +00:00
rtld_lock.c
rtld_lock.h
rtld_printf.c
rtld_printf.h
rtld_tls.h
rtld.1 Import the DragonFly BSD commit 4f0bc915b65fcf5a23214f6d221d65c80be68ad4 2012-07-15 10:53:48 +00:00
rtld.c The origin_subst_one() function limits the length of the string to 2013-04-15 20:06:56 +00:00
rtld.h Import the DragonFly BSD commit 4f0bc915b65fcf5a23214f6d221d65c80be68ad4 2012-07-15 10:53:48 +00:00
Symbol.map
xmalloc.c Implement xstrdup() using strlen()/xmalloc()/memcpy() already 2012-03-23 12:04:44 +00:00