kib df68f62846 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
..
2013-01-31 08:55:21 +00:00
2012-09-14 17:50:42 +00:00
2012-09-14 17:50:42 +00:00
2012-03-26 15:18:14 +00:00
2012-01-07 16:09:54 +00:00
2010-12-19 13:05:17 +00:00