home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.std.c
- Path: sparky!uunet!europa.asd.contel.com!gatech!usenet.ins.cwru.edu!agate!spool.mu.edu!sdd.hp.com!decwrl!deccrl!news.crl.dec.com!dbased.nuo.dec.com!nntpd.lkg.dec.com!e2big.mko.dec.com!jrdzzz.jrd.dec.com!jit533.jit.dec.com!diamond
- From: diamond@jit533.jit.dec.com (Norman Diamond)
- Subject: Re: definition of strNcpy
- Message-ID: <BzMzqC.n0u@jrd.dec.com>
- Sender: usenet@jrd.dec.com (USENET News System)
- Nntp-Posting-Host: jit533.jit.dec.com
- Reply-To: diamond@jit.dec.com (Norman Diamond)
- Organization: Digital Equipment Corporation Japan , Tokyo
- References: <1992Dec18.015228.6094@dms.agames.com> <1992Dec18.180358.24428@dms.agames.com> <BzMGp3.Hwr@math.uwaterloo.ca>
- Date: Tue, 22 Dec 1992 01:20:35 GMT
- Lines: 16
-
- In article <BzMGp3.Hwr@math.uwaterloo.ca> rbutterw@math.uwaterloo.ca (Ray Butterworth [MFCF]) writes:
- >As an aside, does anyone ever actually use strncat?
- >If the "N" were the total length of the data including what is already
- >in the string, it might be useful.
-
- Remember, a language with gets() and other such niceties is intended for
- hacking, not for security. The "N" is intended to bring over a known portion
- of the source string, not to protect other stuff near the target. Now this
- raises the question of why memcpy() was invented, and I don't know the answer.
-
- On a more serious note, people actually do use gets(). I'd worry about this
- kind of dangerous stuff long before caring about silly things like strncat().
- --
- Norman Diamond diamond@jit081.enet.dec.com
- If this were the company's opinion, I wouldn't be allowed to post it.
- "It's been a lovely recession."
-