Date: Wed, 27 Jan 1999 13:35:08 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: current@FreeBSD.ORG Subject: kern/subr_scanf array index of signed char Message-ID: <199901272135.NAA57832@apollo.backplane.com>
next in thread | raw e-mail | index | archive | help
BZZZZZZZZZZZzzzzzzzzzzztttttt! Houston, we have a problem!
Fixed.
-Matt
Matthew Dillon
<dillon@backplane.com>
@@ -323,7 +323,7 @@
/* take only those things in the class */
if (flags & SUPPRESS) {
n = 0;
- while (ccltab[*inp]) {
+ while (ccltab[(int)(unsigned char)*inp]) {
n++, inr--, inp++;
if (--width == 0)
break;
@@ -337,7 +337,7 @@
goto match_failure;
} else {
p0 = p = va_arg(ap, char *);
- while (ccltab[*inp]) {
+ while (ccltab[(int)(unsigned char)*inp]) {
inr--;
*p++ = *inp++;
if (--width == 0)
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901272135.NAA57832>
