freebsd-skq/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
arm Merging of projects/armv6, part 2 2012-08-15 03:07:41 +00:00
i386
ia64
mips
powerpc
powerpc64 Avoid use of register variables, which some compilers (e.g. clang) 2013-02-08 17:44:44 +00:00
sparc64
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
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