Path: utzoo!utgpu!water!watmath!clyde!att-cb!att-ih!pacbell!ames!mailrus!nrl-cmf!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: noalias, again (was extern const) Message-ID: <7609@brl-smoke.ARPA> Date: 3 Apr 88 02:19:24 GMT References: <7712@apple.Apple.Com> <7485@brl-smoke.ARPA> <10731@mimsy.UUCP> <7553@brl-smoke.ARPA> <7007@ki4pv.uucp> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 18 In article <7007@ki4pv.uucp> tanner@ki4pv.uucp (Dr. T. Andrews) writes: >I'd like to know whose intentions are specified in this "noalias" >functionality. Seems like the original routine did the "right" >thing, working for those fine people wishing to shorten their >strings. "noalias" has nothing to do with the fact that that has always been an unsafe usage of strcpy(). Note that Chris looked up one VAX version and found that it used a right-to-left copy machine instruction. Unless the implementor decided to take special pains to make this safe for string shortening, people who use it that way will get results other than what they intended. What about programmers who want to use strcpy() to make room in a string to insert an extra character? Don't tell me that they are all wet while those who want to shorten strings are blessed. The plain truth is that generic strcpy() should not be used for either purpose. Sorry, but that's existing practice, folks.