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:
parent
ecfef94723
commit
b06e8b97a9
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user