summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-05-30 22:25:04 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-05-30 22:25:04 +0200
commitc830701a444a8f4f1ce8ce55fa7c1aff083ee5cc (patch)
treee27e419efbc45fa6178fd095c40fb869a820039c
parent5cfb3da3862415bf2c7d4312edd4b6962d5eaeef (diff)
downloadtdepim-c830701a444a8f4f1ce8ce55fa7c1aff083ee5cc.tar.gz
tdepim-c830701a444a8f4f1ce8ce55fa7c1aff083ee5cc.zip
Fix IMAP parsing mistakes due to internal memory errors
-rw-r--r--tdeioslaves/imap4/imap4.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tdeioslaves/imap4/imap4.cc b/tdeioslaves/imap4/imap4.cc
index cb0f06ad8..666bce9e5 100644
--- a/tdeioslaves/imap4/imap4.cc
+++ b/tdeioslaves/imap4/imap4.cc
@@ -2658,7 +2658,7 @@ ssize_t IMAP4Protocol::myRead(void *data, ssize_t len)
ssize_t copyLen = (len < readBufferLen) ? len : readBufferLen;
memcpy(data, readBuffer, copyLen);
readBufferLen -= copyLen;
- if (readBufferLen) memcpy(readBuffer, &readBuffer[copyLen], readBufferLen);
+ if (readBufferLen) memmove(readBuffer, &readBuffer[copyLen], readBufferLen);
return copyLen;
}
if (!isConnectionValid()) return 0;