diff options
| author | Uri Lublin <uril@redhat.com> | 2011-12-06 15:36:38 +0200 |
|---|---|---|
| committer | Uri Lublin <uril@redhat.com> | 2011-12-20 18:27:32 +0200 |
| commit | 5d28d1662e6e415367bb283d051e0a690a8ec2f2 (patch) | |
| tree | c6af5edfb95f43ad1ff92c35b4c9650f4710bf5b /client/foreign_menu.cpp | |
| parent | ffc4de01e6f9ea0676f17b10e45a137d7e15d6ac (diff) | |
client controller/foreign_menu: use memmove instead of memcpy in readers
When src/dst memory areas may overlap, it's safer to use memmove.
Diffstat (limited to 'client/foreign_menu.cpp')
| -rw-r--r-- | client/foreign_menu.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client/foreign_menu.cpp b/client/foreign_menu.cpp index 926e266f..00cc57ca 100644 --- a/client/foreign_menu.cpp +++ b/client/foreign_menu.cpp @@ -237,7 +237,7 @@ bool ForeignMenuConnection::read_msgs() pos += hdr->size; } if (nread > 0 && pos != _read_buf) { - memcpy(_read_buf, pos, nread); + memmove(_read_buf, pos, nread); } _read_pos = _read_buf + nread; return true; |
