freebsd-skq/usr.bin/find
jilles f78eb5cce2 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
..
extern.h find: Fix segfault with very long path in -exec/-ok ... {} \;. 2015-08-05 21:33:30 +00:00
find.1 find.1: Add missing whitespace: 2015-04-20 02:23:00 +00:00
find.c find: Correctly propagate -exec/-execdir ... {} + exit status. 2014-04-12 22:36:26 +00:00
find.h find: Include nanoseconds when comparing timestamps of files. 2013-03-17 22:51:58 +00:00
function.c Correct scale factor for T terabyte suffix 2014-10-08 17:40:58 +00:00
getdate.y
ls.c
main.c find: Correctly propagate -exec/-execdir ... {} + exit status. 2014-04-12 22:36:26 +00:00
Makefile Add the Clang specific -Wmissing-variable-declarations to WARNS=6. 2013-04-19 19:45:00 +00:00
Makefile.depend new depends 2015-06-16 23:37:19 +00:00
misc.c find: Fix segfault with very long path in -exec/-ok ... {} \;. 2015-08-05 21:33:30 +00:00
operator.c
option.c Add an option for finding sparse files. 2013-03-03 20:10:56 +00:00