[pkg-xmule-commits] CVS xmule/debian/patches
CVS User dleidert-guest
pkg-xmule-maintainers@lists.alioth.debian.org
Sun, 19 Jun 2005 13:24:13 +0000
Update of /cvsroot/pkg-xmule/xmule/debian/patches
In directory haydn:/tmp/cvs-serv24301/patches
Modified Files:
05_fix_exit_segfault.dpatch
Log Message:
xmule (1.10.0b-2) unstable; urgency=low
[..]
* fixed: 05_fix_exit_segfault.dpatch - now also fixes a possible buffer
override and one minor bug, detected and patched by Uri
[..]
patch from CVS, patch mentioned at
http://www.xmule.ws/node/6?PHPSESSID=313cfa9b5b87638ceb2dfda094047633#comment
--- /cvsroot/pkg-xmule/xmule/debian/patches/05_fix_exit_segfault.dpatch 2005/05/14 19:32:02 1.1
+++ /cvsroot/pkg-xmule/xmule/debian/patches/05_fix_exit_segfault.dpatch 2005/06/19 13:24:12 1.2
@@ -1,13 +1,39 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
-## 05_fix_exit_segfault.dpatch by Un-Thesis and Avi via IRC
+## 05_fix_exit_segfault.dpatch by Un-Thesis and Avi via IRC and Uri
##
## All lines beginning with `## DP:' are a description of the patch.
-## DP: fix for segfault during exit action
+## DP: fix for segfault during exit action.
+## DP: contributed bug-fixes from
+## DP: http://www.xmule.ws/node/6?PHPSESSID=313cfa9b5b87638ceb2dfda094047633#comment
@DPATCH@
-diff -urNad xmule-1.10.0b/src/EMSocket.h /tmp/dpep.Y6oREw/xmule-1.10.0b/src/EMSocket.h
---- xmule-1.10.0b/src/EMSocket.h 2005-05-14 21:12:48.582218872 +0200
-+++ /tmp/dpep.Y6oREw/xmule-1.10.0b/src/EMSocket.h 2005-05-14 21:12:51.013849208 +0200
+diff -urNad --exclude=CVS --exclude=.svn ./src/DownloadClient.cpp /tmp/dpep-work.Vt0Rx1/xmule-1.10.0b/src/DownloadClient.cpp
+--- ./src/DownloadClient.cpp 2005-06-17 21:25:35.000000000 +0200
++++ /tmp/dpep-work.Vt0Rx1/xmule-1.10.0b/src/DownloadClient.cpp 2005-06-19 15:06:28.546445088 +0200
+@@ -873,8 +873,18 @@
+ {
+ Requested_Block_Struct *cur_block;
+ unsigned int x;
+- partsYN.Alloc(m_nPartCount + 1);
+- for (x = 0; x <= m_nPartCount; x++) partsYN.SetChar(x, 'N');
++
++ {
++ bool allocateSuccess = partsYN.Alloc(m_nPartCount + 1);
++ assert(allocateSuccess);
++ }
++
++ partsYN.Empty();
++ for (x = 0; x <= m_nPartCount; ++x)
++ {
++ partsYN.Append('N');
++ }
++
+ for (POSITION pos = m_PendingBlocks_list.GetHeadPosition(); pos != 0; m_PendingBlocks_list.GetNext(pos))
+ {
+ cur_block = m_PendingBlocks_list.GetAt(pos)->block;
+diff -urNad --exclude=CVS --exclude=.svn ./src/EMSocket.h /tmp/dpep-work.Vt0Rx1/xmule-1.10.0b/src/EMSocket.h
+--- ./src/EMSocket.h 2005-06-18 21:49:38.000000000 +0200
++++ /tmp/dpep-work.Vt0Rx1/xmule-1.10.0b/src/EMSocket.h 2005-06-19 14:51:27.374444056 +0200
@@ -47,7 +47,7 @@
public:
@@ -17,9 +43,21 @@
bool SendPacket(Packet* packet, bool delpacket = true,bool controlpacket = true);// controlpackets have a higher priority
bool IsBusy() {return sendbuffer;}
bool IsConnected() { return byConnected==ES_CONNECTED;};
-diff -urNad xmule-1.10.0b/src/ServerSocket.h /tmp/dpep.Y6oREw/xmule-1.10.0b/src/ServerSocket.h
---- xmule-1.10.0b/src/ServerSocket.h 2005-05-14 21:12:48.582218872 +0200
-+++ /tmp/dpep.Y6oREw/xmule-1.10.0b/src/ServerSocket.h 2005-05-14 21:12:51.013849208 +0200
+diff -urNad --exclude=CVS --exclude=.svn ./src/KnownFile.cpp /tmp/dpep-work.Vt0Rx1/xmule-1.10.0b/src/KnownFile.cpp
+--- ./src/KnownFile.cpp 2005-06-17 21:25:35.000000000 +0200
++++ /tmp/dpep-work.Vt0Rx1/xmule-1.10.0b/src/KnownFile.cpp 2005-06-19 14:52:35.837036160 +0200
+@@ -242,7 +242,7 @@
+ delete[] directory;
+ }
+
+- directory = new char[path.length()];
++ directory = new char[path.length()+1];
+ strcpy(directory, path.c_str());
+ }
+
+diff -urNad --exclude=CVS --exclude=.svn ./src/ServerSocket.h /tmp/dpep-work.Vt0Rx1/xmule-1.10.0b/src/ServerSocket.h
+--- ./src/ServerSocket.h 2005-06-18 21:49:38.000000000 +0200
++++ /tmp/dpep-work.Vt0Rx1/xmule-1.10.0b/src/ServerSocket.h 2005-06-19 14:51:27.374444056 +0200
@@ -45,7 +45,7 @@
CServerSocket() {};
public:
@@ -29,9 +67,9 @@
void ConnectToServer(CServer* server);
int8_t GetConnectionState() {return connectionstate;}
-diff -urNad xmule-1.10.0b/src/sockets.cpp /tmp/dpep.Y6oREw/xmule-1.10.0b/src/sockets.cpp
---- xmule-1.10.0b/src/sockets.cpp 2005-05-14 21:12:48.583218720 +0200
-+++ /tmp/dpep.Y6oREw/xmule-1.10.0b/src/sockets.cpp 2005-05-14 21:15:40.636062712 +0200
+diff -urNad --exclude=CVS --exclude=.svn ./src/sockets.cpp /tmp/dpep-work.Vt0Rx1/xmule-1.10.0b/src/sockets.cpp
+--- ./src/sockets.cpp 2005-06-18 21:49:38.000000000 +0200
++++ /tmp/dpep-work.Vt0Rx1/xmule-1.10.0b/src/sockets.cpp 2005-06-19 14:51:27.375443904 +0200
@@ -445,8 +445,10 @@
{
CServerSocket* tmp((CServerSocket *)m_lstOpenSockets.GetNext(pos));