Re: [CHECKER] Security reports involving isspace()

From: ken
Date: Tue Apr 20 2004 - 18:59:37 EST

> On Tue, Apr 20, 2004 at 03:14:21PM -0700, ken@xxxxxxxxxxxx wrote:
>> All of the reports below deal with the isspace macro. It expands to an
>> access to a static array with 256 entries. If we use an unsigned char
>> to
>> index into the array, there are no problems. However, when that char is
>> signed, we can index off the left of the array.
>> It seems like this isn't a big deal, but if the isspace array is located
>> after some important data structure, we could leak information.
> #define __ismask(x) (_ctype[(int)(unsigned char)(x)])
> #define isspace(c) ((__ismask(c)&(_S)) != 0)

Sorry, my mistake. I only saw the cast to int in __ismask(x). Thanks for
the quicky reply.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at