Subject: Re: lib/19638: isalpha (3) bug
To: Andrew Brown <firstname.lastname@example.org>
From: Dave Sainty <email@example.com>
Date: 01/03/2003 20:03:19
Andrew Brown writes:
> > Feeding a routine in libc a perfectly valid int should NOT cause the
> > libc routine to segfault. That is Bad.
> >Sugested fix:
> >Add this c-equivalent line to isalpha(c):
> > if( c < 0 || c > 0xff)return 0; // Cannot be alphabetic
> > // this "if" could also be nicely encoded as a bit test against 0xffffff00
> > // Else, array bound is OK, index into our 256-byte array
> does this rudely prohibit unicode characters from being examined and
iswalpha() is the equivalent interface for wide characters.