diff options
author | jilles <jilles@FreeBSD.org> | 2015-08-05 21:33:30 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2015-08-05 21:33:30 +0000 |
commit | f78eb5cce25af533d8ed1a03dce08e1cfdd894c2 (patch) | |
tree | 08b3ebc54ab5a750014aa548d13b5f24a564a667 /contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp | |
parent | 5f52dff95ea8793cd2f43138a882afdf4db94af8 (diff) | |
download | FreeBSD-src-f78eb5cce25af533d8ed1a03dce08e1cfdd894c2.zip FreeBSD-src-f78eb5cce25af533d8ed1a03dce08e1cfdd894c2.tar.gz |
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
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp')
0 files changed, 0 insertions, 0 deletions