summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/strnlen.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* I am retiring my old email address; replace it with my OpenBSD one.millert2019-01-251-2/+2
|
* Roll back uintptr_t cast changes after discussions with tedu, otto anddtucker2016-10-161-7/+2
| | | | | | | | | | | | | others. C11 6.5.6.9 says: When two pointers are subtracted, both shall point to elements of the same array object, or one past the last element of the array object; the result is the difference of the subscripts of the two array elements. In these cases the objects are arrays of char so the result is defined, and we believe that the report is based on a compiler incorrectly trapping on defined behaviour.
* Cast pointers to uintptr_t to avoid potential signedness errors.dtucker2016-10-141-2/+7
| | | | | Based on patch from yuanjie.huang at windriver.com via OpenSSH bz#2608, with & ok millert, ok deraadt.
* Add framework for resolving (pun intended) libc namespace issues, usingguenther2015-08-311-1/+2
| | | | | | | | | | | | wrapper .h files and asm labels to let internal calls resolve directly and not be overridable or use the PLT. Then, apply that framework to most of the functions in stdio.h, string.h, err.h, and wchar.h. Delete the should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here. tests clean on i386, amd64, sparc64, powerpc, and mips64 naming feedback from kettenis@ and millert@ ok kettenis@
* mop up ifndef KERNEL goo; ok miodderaadt2014-06-101-5/+1
|
* Add strnlen() to libkern.matthew2012-04-261-1/+5
| | | | ok deraadt
* Avoid using and end pointer since strnlen(string, -1) is legalmillert2010-06-021-4/+3
| | | | | and would otherwise result in overflowing the end pointer and cause strnlen() to return 0. OK sthen@
* remove unused variable.chl2010-05-211-2/+1
| | | | ok millert@ tedu@
* add posix_madvise, posix_memalign, strndup, and strnlen. mostly fromtedu2010-05-181-0/+34
brad and millert, with hints from guenther, jmc, and otto I think. ok previous.