[prev in list] [next in list] [prev in thread] [next in thread] 

List:       thttpd
Subject:    Re: [THTTPD] memmove() patch
From:       Ross Patterson <Ross.Patterson () CatchFS ! Com>
Date:       2003-12-02 20:33:30
[Download RAW message or body]

On Tuesday 02 December 2003 03:17 pm, A.D.F. wrote:
> I haven't looked at strcpy() implementation in C libraries
> (GNU and others) but it would be interesting to do it.

I didn't look at the GNU library, but the NetBSD implementation does exactly 
what some folks expect, allowing right-to-left copying:

	for (; (*to = *from) != '\0'; ++from, ++to);

But it doesn't matter how it's implemented, because strcpy()'s behavior with 
overlapping strings has always been "undefined".  It might work, it might 
not.  After all, an Israeli version might copy bytes from right to left!
-- 
Ross A. Patterson
Chief Technology Officer
CatchFIRE Systems, Inc.
5885 Trinity Parkway, Suite 220
Centreville, VA  20120
(703) 563-4164

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic