mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
Replaced memcpy() with memmove() to make safe_strcpy() safe for overlapping
source and destination.
(This used to be commit 30411d4004
)
This commit is contained in:
parent
5fb9a869b7
commit
b3443597e2
@ -894,7 +894,7 @@ char *safe_strcpy(char *dest,const char *src, size_t maxlength)
|
||||
len = maxlength;
|
||||
}
|
||||
|
||||
memcpy(dest, src, len);
|
||||
memmove(dest, src, len);
|
||||
dest[len] = 0;
|
||||
return dest;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user