Date: Mon, 8 Aug 2005 19:38:00 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/libkern strcasecmp.c Message-ID: <200508081938.j78Jc0DO045124@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
pjd 2005-08-08 19:38:00 UTC FreeBSD src repository Modified files: sys/libkern strcasecmp.c Log: 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. Revision Changes Path 1.2 +6 -4 src/sys/libkern/strcasecmp.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508081938.j78Jc0DO045124>