Re: Security in general (was Re: Proposal "LUID")

From: willy@thepuffingroup.com
Date: Wed Apr 19 2000 - 11:09:14 EST


On Wed, Apr 19, 2000 at 10:03:46AM -0400, Horst von Brand wrote:
> strncpy(3) and its ilk instead of strcpy(3) et al is standard
> recomendation, take a look at the Secure-Programs-HOWTO for instance.

strncpy Considered Harmful. use strlen and memcpy instead. it's faster
and gives you more useful information.

(the number of people who don't realise than strncpy zero-fills is
amazingly high. Oh and that it doesn't necessarily give you a string
as the result..)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:15 EST