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:27:34 +0200
commit84caa32d49fd081e86b7eaeae5476cd9249b3f98 (patch)
tree8ae70f736b2c2e871e4c9fc5931483123915871a
parent6c74b8921ac64813aea4074dacc8770945ff92c6 (diff)
downloadtdepim-3.5.13.2.tar.gz
tdepim-3.5.13.2.zip
Fix IMAP parsing mistakes due to internal memory errorsv3.5.13.2
(cherry picked from commit c830701a444a8f4f1ce8ce55fa7c1aff083ee5cc)
-rw-r--r--kioslaves/imap4/imap4.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/kioslaves/imap4/imap4.cc b/kioslaves/imap4/imap4.cc
index 05469be3..bf7e8ff1 100644
--- a/kioslaves/imap4/imap4.cc
+++ b/kioslaves/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;