1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-04 12:52:15 +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
divdi3.c
ffs.c
ffsl.c
fls.c
flsl.c
fnmatch.c
gets.c
iconv_converter_if.m
iconv_xlat16.c
iconv_xlat.c
iconv.c
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