summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/getcwd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Return ERANGE from getcwd() if buffer size is 1.Darren Tucker2022-07-141-1/+4
| | | | | | | | | | | | | If getcwd() is supplied a buffer size of exactly 1 and a path of "/", it could result in a nul byte being written out of array bounds. POSIX says it should return ERANGE if the path will not fit in the available buffer (with terminating nul). 1 byte cannot fit any possible path with its nul, so immediately return ERANGE in that case. OpenSSH never uses getcwd() with this buffer size, and all current (and even quite old) platforms that we are currently known to work on have a native getcwd() so this code is not used on those anyway. Reported by Qualys, ok djm@
* remove sys/param.h in -portable, after upstreamDamien Miller2021-12-211-1/+0
|
* Repair $OpenBSD markers.Darren Tucker2016-08-021-1/+1
|
* - (djm) [openbsd-compat/getcwd.c] Remove OpenBSD rcsid marker since we noDamien Miller2011-09-231-1/+1
| | | | | longer want to sync this file (OpenBSD uses a __getcwd syscall now, we want this longhand version)
* - (dtucker) [openbsd-compat/getcwd.c] Replace lstat with fstat to match upDarren Tucker2005-11-101-4/+2
| | | | with OpenBSD code since we don't support platforms without fstat any more.
* - (dtucker) [openbsd-compat/getcwd.c] Update from OpenBSD 1.9 -> 1.14.Darren Tucker2005-11-101-22/+22
|
* - (dtucker) [openbsd-compat/{LOTS}] Move the "OPENBSD ORIGINAL" markers toDarren Tucker2005-11-101-2/+2
| | | | | after the copyright notices. Having them at the top next to the CVSIDs guarantees a conflict for each and every sync.
* - (djm) Annotate OpenBSD-derived files in openbsd-compat/ with originalDamien Miller2003-11-241-0/+2
| | | | source file path (in OpenBSD tree).
* - (bal) openbsd-compat/ OpenBSD updates. Mostly licensing, ansificationsBen Lindstrom2003-08-251-2/+2
| | | | and minor fixes.
* - (djm) Sync openbsd-compat with OpenBSD CVS.Damien Miller2003-06-031-1/+4
| | | | - No more 4-term BSD licenses in our tree
* - (djm) Sync openbsd-compat/ with OpenBSD -currentDamien Miller2003-01-081-2/+2
|
* - (bal) s/config.h/includes.h/ in openbsd-compat/ for *.c. Otherwise wiseBen Lindstrom2002-06-271-1/+1
| | | | | have issues of our fixes not propogating right (ie bcopy instead of memmove). OK tim
* - (bal) Fix mixed up params to memmove() from Jan 5th in setenv.c andBen Lindstrom2001-02-191-4/+4
| | | | getcwd.c.
* - (bal) Reorder. Move all bsd-*, fake-*, next-*, and cygwin* stuff toBen Lindstrom2001-01-311-0/+237
openbsd-compat/. And resolve all ./configure and Makefile.in issues assocated. Logic: * All OpenBSD functions should have the same filename as in the OpenBSD tree * All 'home brew' functions have bsd-* infront of them. * All 'not really implemented' functions have fake-* infront of them.