diff options
author | jilles <jilles@FreeBSD.org> | 2015-08-28 20:53:08 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2015-08-28 20:53:08 +0000 |
commit | 461d06c693c3223ca34cea5045561db8eab04880 (patch) | |
tree | 95afb4bdf6c2df78b6446422273e67f919cac46e /lib/libc | |
parent | 655a5b9a1671aa2e1c7c81a6aabd4e7792f8dab5 (diff) | |
download | FreeBSD-src-461d06c693c3223ca34cea5045561db8eab04880.zip FreeBSD-src-461d06c693c3223ca34cea5045561db8eab04880.tar.gz |
MFC r286344: 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
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions