Jilles Tjoelker a2925a5ae3 find: Fix segfault with very long path in -exec/-ok ... {} \;.
If the resulting argument is longer than MAXPATHLEN, realloc() was called to
extend the space, but the new pointer was not correctly stored.

Different from what OpenBSD has done, rewrite brace_subst() to calculate the
necessary space first and realloc() at most once.

As before, the e_len fields are not updated in case of a realloc.
Therefore, a following long argument will do another realloc.

PR:		201750
MFC after:	1 week
2015-08-05 21:33:30 +00:00
..
2015-06-16 23:37:19 +00:00
2015-06-16 23:37:19 +00:00
2015-06-16 23:37:19 +00:00
2015-06-16 23:37:19 +00:00
2015-06-16 23:37:19 +00:00
2015-08-01 17:27:47 +00:00
2015-07-21 10:52:05 +00:00
2015-06-16 23:37:19 +00:00
2015-06-16 23:37:19 +00:00
2015-06-16 23:37:19 +00:00
2015-06-16 23:37:19 +00:00
2015-06-16 23:37:19 +00:00
2015-06-16 23:37:19 +00:00
2015-07-14 19:43:10 +00:00
2015-06-16 23:37:19 +00:00
2015-06-16 23:37:19 +00:00
2015-06-16 23:37:19 +00:00
2015-06-16 23:37:19 +00:00
2015-06-16 23:37:19 +00:00
2015-08-03 18:47:45 +00:00
2015-06-26 23:55:02 +00:00
2015-06-16 23:37:19 +00:00
2015-08-04 07:04:36 +00:00