1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-26 11:47:31 +00:00
freebsd/sys/libkern
Pawel Jakub Dawidek 57169160b0 Ha! This is a very interesting bug.
I copied strcasecmp() from userland to the kernel and it didn't worked!
I started to debug the problem and I find out that this line:

	while (tolower(*us1) == tolower(*us2++)) {

was adding _3_ bytes to 'us2' pointer. Am I loosing my minds here?!...
No, in-kernel tolower() is a macro which uses its argument three times.
Bad tolower(9), no cookie.
2005-08-08 19:38:00 +00:00
..
alpha
arm
ia64
arc4random.c
ashldi3.c
ashrdi3.c
bcd.c
bcmp.c
bsearch.c
crc32.c Update comment to direct the reader to libkern.h instead of systm.h. 2005-04-28 05:50:18 +00:00
divdi3.c
ffs.c
ffsl.c
fls.c
flsl.c
fnmatch.c
gets.c
iconv_converter_if.m
iconv_xlat16.c Fix kiconv on the 64bit plathomes. 2005-05-24 15:38:08 +00:00
iconv_xlat.c
iconv.c Temporary restore a part of rev 1.6. 2005-07-23 16:52:57 +00:00
index.c
inet_ntoa.c
lshrdi3.c
mcount.c
moddi3.c
qdivrem.c
qsort_r.c
qsort.c
quad.h
random.c
rindex.c
scanc.c
skpc.c
strcasecmp.c Ha! This is a very interesting bug. 2005-08-08 19:38:00 +00:00
strcat.c
strcmp.c
strcpy.c
strdup.c
strlcat.c
strlcpy.c
strlen.c
strncmp.c
strncpy.c
strsep.c
strspn.c
strtol.c
strtoq.c
strtoul.c
strtouq.c
strvalid.c
ucmpdi2.c
udivdi3.c
umoddi3.c