diff options
author | 1999-10-03 19:17:31 +0000 | |
---|---|---|
committer | 1999-10-03 19:17:31 +0000 | |
commit | 5f26a9306f4e6235df3eb0ffc037e3a65b23b54f (patch) | |
tree | 50c9c8b045abb0de80f82c521f3db743f41a04d8 /usr.bin/ssh/serverloop.c | |
parent | Do not use FTS_CHDIRROOT flag as it is fatally flawed. Instead, (diff) | |
download | wireguard-openbsd-5f26a9306f4e6235df3eb0ffc037e3a65b23b54f.tar.xz wireguard-openbsd-5f26a9306f4e6235df3eb0ffc037e3a65b23b54f.zip |
Fix multiple problems in the FTS_NOCHDIR case (mycroft@netbsd.org):
* There was an off-by-one error that caused the addition of a NUL or slash
in fts_build() to overwrite other memory.
* After fts_palloc(), we need to reset `cp' so that it points to the new
path name buffer; otherwise the addition of the file name before calling
fts_stat() could lose. Also, fix stupidity in the fts_palloc() interface.
We don't want N bytes more than the current buffer size; we want N bytes
more than the current length. Just pass in the new size, since we can't
figure it out easily here.
fts_padjust() was doing more work than it needed to. Based on changes
from mycroft@netbsd.org.
Check for fts_pathlen oflow in two places. Done before I saw the NetBSD
change (and last I checked they only did one of the checks). In the
case of wrap, return ENAMETOOLONG.
Diffstat (limited to 'usr.bin/ssh/serverloop.c')
0 files changed, 0 insertions, 0 deletions