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
e713e4684d
commit
8cf69c2918
@ -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…
x
Reference in New Issue
Block a user