[666] in linux-security and linux-alert archive

home help back first fref pref prev next nref lref last post

Re: [linux-security] good character, bad character

daemon@ATHENA.MIT.EDU (Lars Wirzenius)
Tue Apr 9 13:54:27 1996

From: Lars Wirzenius <liw@iki.fi>
To: linux-security@tarsier.cv.nrao.edu
In-reply-to: Your message of "Fri, 05 Apr 1996 07:02:31 MDT."
             <199604051302.HAA16126@manifold.algebra.com> 
Date: Sun, 07 Apr 1996 20:51:01 +0300

Igor Chudov @ home:
> #define GOOD_CHAR( c, table ) ((table)[c])

This is probably not on topic for the list, but in machines that have
signed characters, you should never use a plain char as an index unless
you're really sure the character is non-negative.  Otherwise cast it to
unsigned char or do something else to fix it.

-- 

-- 
Lars Wirzenius <wirzeniu@cs.helsinki.fi> <wirzeniu@kruuna.helsinki.fi>
MIME and PGP mail welcome.  Key: finger @kruuna, or check keyservers.
KeyID: 4CBA92D1 Fingerprint: E7 FA 89 85 6D 9B 78 1D F5 30 EB FB D8 11 CA 3F
Publib 0.5: ftp://ftp.cs.helsinki.fi/pub/Software/Local/Publib/


home help back first fref pref prev next nref lref last post