home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / c / 12875 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  1.2 KB

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