This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: fix <ctype.h> bugs on 64-bit machine
- From: Eric Blake <ebb9 at byu dot net>
- To: newlib at sources dot redhat dot com
- Date: Fri, 23 Oct 2009 05:50:39 -0600
- Subject: Re: fix <ctype.h> bugs on 64-bit machine
- References: <loom.20091019T221118-115@post.gmane.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Eric Blake on 10/19/2009 2:21 PM:
> Bruno Haible pointed out to me that on 64-bit machines, the use of isalpha
> (0x100000001LL) will cause an out-of-bounds array dereference, rather than
> returning the correct result of isalpha(1).
Ping.
> 2009-10-19 Eric Blake <ebb9@byu.net>
>
> * libc/include/ctype.h (__ctype_lookup): New macro.
> (isalpha, isupper, islower, isdigit, isxdigit, isspace, ispunct)
> (isalnum, isprint, isgraph, iscntrl, isblank): Use it to fix bug
> on 64-bit machines.
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkrhmI8ACgkQ84KuGfSFAYCqIQCfSyILZv46HL8Gj//vvXgjRhU/
AdUAn2H+djL1JO6gcVBi1ON04y+XSSt7
=3hVr
-----END PGP SIGNATURE-----