summaryrefslogtreecommitdiffstats
path: root/kioslave/pop3
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2012-12-13 19:24:21 +0100
committerSlávek Banko <slavek.banko@axis.cz>2012-12-13 19:27:54 +0100
commit65c85dca64c696a9905a6a5165ff6a25426c88f0 (patch)
tree76ba9dd71ba67bda54d257780b8103d560e88d22 /kioslave/pop3
parent726c61005450a826e6583369125937c9aef74f4b (diff)
downloadtdebase-65c85dca64c696a9905a6a5165ff6a25426c88f0.tar.gz
tdebase-65c85dca64c696a9905a6a5165ff6a25426c88f0.zip
Fix POP3 mailcheck aborting because of internal memory errors
Backported from KDE SVN commit 1156867 This resolves Bug 737
Diffstat (limited to 'kioslave/pop3')
-rw-r--r--kioslave/pop3/pop3.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/kioslave/pop3/pop3.cc b/kioslave/pop3/pop3.cc
index 0ab27f63b..fe91a0747 100644
--- a/kioslave/pop3/pop3.cc
+++ b/kioslave/pop3/pop3.cc
@@ -164,7 +164,7 @@ ssize_t POP3Protocol::myRead(void *data, ssize_t len)
memcpy(data, readBuffer, copyLen);
readBufferLen -= copyLen;
if (readBufferLen)
- memcpy(readBuffer, &readBuffer[copyLen], readBufferLen);
+ memmove(readBuffer, &readBuffer[copyLen], readBufferLen);
return copyLen;
}
waitForResponse(600);
@@ -183,7 +183,7 @@ ssize_t POP3Protocol::myReadLine(char *data, ssize_t len)
data[copyLen] = '\0';
readBufferLen -= copyLen;
if (readBufferLen)
- memcpy(readBuffer, &readBuffer[copyLen], readBufferLen);
+ memmove(readBuffer, &readBuffer[copyLen], readBufferLen);
return copyLen;
}
waitForResponse(600);