1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00
freebsd/usr.bin/find
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
..
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.h
function.c
getdate.y
ls.c
main.c
Makefile
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