summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_ssl_openssl.cpp
diff options
context:
space:
mode:
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-20 02:04:53 +0000
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-20 02:04:53 +0000
commit68b3561749552e5e73d1d684b723b3ea6abe5186 (patch)
tree0acedd7a9d1506be02c270715360af76196ff67b /src/modules/extra/m_ssl_openssl.cpp
parent6e8677f9254d00541f8e37e88af3adab14638b11 (diff)
It is unnecessary and rather less efficient to use memmove() everywhere; it's only needed when the buffers may overlap.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9927 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra/m_ssl_openssl.cpp')
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 0c9307ae4..4368c8d47 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -525,7 +525,7 @@ class ModuleSSLOpenSSL : public Module
{
if (count <= session->inbufoffset)
{
- memmove(buffer, session->inbuf, count);
+ memcpy(buffer, session->inbuf, count);
// Move the stuff left in inbuf to the beginning of it
memmove(session->inbuf, session->inbuf + count, (session->inbufoffset - count));
// Now we need to set session->inbufoffset to the amount of data still waiting to be handed to insp.
@@ -536,7 +536,7 @@ class ModuleSSLOpenSSL : public Module
else
{
// There's not as much in the inbuf as there is space in the buffer, so just copy the whole thing.
- memmove(buffer, session->inbuf, session->inbufoffset);
+ memcpy(buffer, session->inbuf, session->inbufoffset);
readresult = session->inbufoffset;
// Zero the offset, as there's nothing there..