Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Casting ctype lookups

In article <20121114075123.52daa65e@dilbert>,
D'Arcy J.M. Cain <> wrote:
>Would this be safer?
>#define toupper(c)\
>  ((int)((_toupper_tab_ + 1)[(int)(unsigned char)(c)]))

This technique is called sandbagging, and will prevent someone
who legitimately wants to use -1 to do so.


Home | Main Index | Thread Index | Old Index