home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:12875 comp.std.c:2527
- Path: sparky!uunet!world!ksr!jfw
- From: jfw@ksr.com (John F. Woods)
- Newsgroups: comp.lang.c,comp.std.c
- Subject: Re: strcpy implementation question
- Message-ID: <15229@ksr.com>
- Date: 27 Aug 92 13:17:12 EDT
- References: <PINKAS.92Aug21114508@caraway.intel.com> <1992Aug23.003930.9918@saaf.se> <1992Aug23.194919.22007@iecc.cambridge.ma.us> <PINKAS.92Aug24183511@caraway.intel.com>
- Sender: news@ksr.com
- Lines: 13
-
- pinkas@caraway.intel.com (Israel Pinkas) writes:
- >That's the problem. I claim that copying past the end of the string is
- >wrong, as the user may be building a string up backwards. The compiler
- >writers claim that there is nothing in the ANSI spec that claims that the
- >memory past the destination's terminator is inviolate.
-
- I didn't see anything in the ANSI spec for strcpy() that seemed to explicitly
- claim that strcpy() doesn't zero all variables named "ferdinand" in a program,
- but I seriously doubt that a run-time library which did that would be
- compliant. strcpy() copies a string, and does nothing else -- it doesn't
- put random data after the string, it doesn't zero after the string, it
- doesn't zero all variables named "ferdinand".
-
-