Skip Menu |
 

Subject: ctype issues
The following files have issues with conversion of signed char to int
when used with islower, isupper, tolower, and toupper.

gssftp/cmds.c has "char *tp" cast to (int)
telnet/telnet/telnet.c has "char c" cast to (int)
lib/kadm5/srv/server_misc.c has "char c" cast to (int)
lib/kadm5/srv/server_acl.c has "char *op" cast to (int)
lib/krb5/os/hst_realm.c has "char c" and "char *cp" cast to (int)
lib/krb4/kparse.c has "char *q" cast to (int)
lib/krb5/krb/conv_princ.c has "char *cp" cast to (int)
lib/krb5/os/sn2princ.c has "register char *cp" cast to (int)

Jeffrey Altman
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #3445] ctype issues
From: Tom Yu <tlyu@MIT.EDU>
Date: Thu, 09 Feb 2006 16:36:25 -0500
RT-Send-Cc:
As per zephyr discussion, casting to unsigned char may be more correct
than casting to signed int, given platforms where char defaults to
signed in combination with non-ascii characters. Also, changing the
type of the variable passed to the ctype.h macros may be more
appropriate in some of the cases.
From: raeburn@mit.edu
Subject: SVN Commit
Change a bunch of calls to ctype macros (those cited by Jeff, and a
few others) to cast the character values to unsigned char.

Commit By: raeburn



Revision: 18156
Changed Files:
U trunk/src/appl/gssftp/ftp/cmds.c
U trunk/src/appl/telnet/telnet/telnet.c
U trunk/src/lib/kadm5/srv/server_acl.c
U trunk/src/lib/kadm5/srv/server_misc.c
U trunk/src/lib/krb4/kparse.c
U trunk/src/lib/krb5/ccache/ccbase.c
U trunk/src/lib/krb5/keytab/ktbase.c
U trunk/src/lib/krb5/krb/conv_princ.c
U trunk/src/lib/krb5/os/hst_realm.c
U trunk/src/lib/krb5/os/sn2princ.c
U trunk/src/tests/asn.1/utility.c