Suggest using memmove(3) if src and dst may overlap.

PR:		33298
Submitted by:	Tim J. Robbins <tim@robbins.dropbear.id.au>
This commit is contained in:
Dima Dorfman 2002-01-07 06:03:37 +00:00
parent ecfef94723
commit b06e8b97a9

View File

@ -82,5 +82,10 @@ is implemented using
.Xr bcopy 3 ,
and therefore the strings may overlap.
On other systems, copying overlapping strings may produce surprises.
A simpler solution is to not use
.Fn memcpy .
Programs intended to be portable should use
.Xr memmove 3
when
.Fa src
and
.Fa dst
may overlap.