From 44c2573f6f07607feef48ae4e4b27be028520c66 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 20 Dec 2005 20:56:39 +0000 Subject: [PATCH] - added Changed files: centericq-icq-short-read.patch -> 1.1 centericq-memory-handling.patch -> 1.1 --- centericq-icq-short-read.patch | 10 ++++++++++ centericq-memory-handling.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 centericq-icq-short-read.patch create mode 100644 centericq-memory-handling.patch diff --git a/centericq-icq-short-read.patch b/centericq-icq-short-read.patch new file mode 100644 index 0000000..7d1d700 --- /dev/null +++ b/centericq-icq-short-read.patch @@ -0,0 +1,10 @@ +--- centericq-4.21.0.orig/libicq2000-0.1/src/DirectClient.cpp ++++ centericq-4.21.0/libicq2000-0.1/src/DirectClient.cpp +@@ -162,6 +162,7 @@ + + m_recv.setLittleEndian(); + m_recv >> length; ++ if (length == 0) return; // short read, toss it back (nothing to do) + if (length > Incoming_Packet_Limit) throw ParseException("Received too long incoming packet"); + if (m_recv.remains() < length) return; // waiting for more of the packet + diff --git a/centericq-memory-handling.patch b/centericq-memory-handling.patch new file mode 100644 index 0000000..5249e73 --- /dev/null +++ b/centericq-memory-handling.patch @@ -0,0 +1,26 @@ +--- centericq-4.21.0.orig/src/icqface.cc ++++ centericq-4.21.0/src/icqface.cc +@@ -2003,7 +2003,7 @@ + mvaddchnstr(i-1, sizeWArea.x1+1, logline, sizeWArea.x2-sizeWArea.x1); + } + +- delete logline; ++ delete[] logline; + + if(text.size() > sizeWArea.x2-sizeWArea.x1-2) text.resize(sizeWArea.x2-sizeWArea.x1-2); + mvhline(LINES-3, sizeWArea.x1+2, ' ', sizeWArea.x2-sizeWArea.x1-2); +only in patch2: +unchanged: +--- centericq-4.21.0.orig/kkstrtext-0.1/kkstrtext.cc ++++ centericq-4.21.0/kkstrtext-0.1/kkstrtext.cc +@@ -907,8 +907,8 @@ + r += soutbuf; + text.erase(0, text.size()-inleft); + +- delete soutbuf; +- delete sinbuf; ++ delete[] soutbuf; ++ free(sinbuf); + + if(res == -1 && errno != EILSEQ) + break; -- 2.44.0