freebsd-dev/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 Rtld links with the specially built pic static libc library to get some 2011-08-24 20:05:13 +00:00
debug.h Use C99's varadic macro syntax instead of gcc's. 2006-03-28 18:26:47 +00:00
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 links with the specially built pic static libc library to get some 2011-08-24 20:05:13 +00:00
rtld_lock.h Implement support for ELF filters in rtld. Both normal and auxillary 2010-12-25 08:51:20 +00:00
rtld_printf.c Remove the use of toupper() from rtld_printf.c. Use of the libc function 2012-03-09 16:21:40 +00:00
rtld_printf.h Rtld links with the specially built pic static libc library to get some 2011-08-24 20:05:13 +00:00
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 Implement fdlopen(3), an rtld interface to load shared object by file 2012-01-07 10:33:01 +00:00
xmalloc.c Implement xstrdup() using strlen()/xmalloc()/memcpy() already 2012-03-23 12:04:44 +00:00