mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
1 changed files with 7 additions and 2 deletions
|
|
@ -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 a new issue