diff options
author | Mike Gilbert <floppym@gentoo.org> | 2015-10-03 15:09:17 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2015-10-03 15:09:31 -0400 |
commit | 63a4598a1ae65384bf49a869b292a90509d96633 (patch) | |
tree | 6afc0f58da25df301570276e0b88d14470117fce /net-p2p/transmission | |
parent | java-utils-2.eclass: Fix this untested java-pkg_clean crap (diff) | |
download | gentoo-63a4598a1ae65384bf49a869b292a90509d96633.tar.gz gentoo-63a4598a1ae65384bf49a869b292a90509d96633.tar.bz2 gentoo-63a4598a1ae65384bf49a869b292a90509d96633.zip |
net-p2p/transmission: Fix segfault
Bug: https://bugs.gentoo.org/534308
Package-Manager: portage-2.2.22_p5
Diffstat (limited to 'net-p2p/transmission')
-rw-r--r-- | net-p2p/transmission/files/2.84-node_alloc-segfault.patch | 55 | ||||
-rw-r--r-- | net-p2p/transmission/transmission-2.84-r3.ebuild (renamed from net-p2p/transmission/transmission-2.84-r2.ebuild) | 1 |
2 files changed, 56 insertions, 0 deletions
diff --git a/net-p2p/transmission/files/2.84-node_alloc-segfault.patch b/net-p2p/transmission/files/2.84-node_alloc-segfault.patch new file mode 100644 index 000000000000..717242879a75 --- /dev/null +++ b/net-p2p/transmission/files/2.84-node_alloc-segfault.patch @@ -0,0 +1,55 @@ +Index: libtransmission/list.c +=================================================================== +--- libtransmission/list.c (revision 14318) ++++ libtransmission/list.c (revision 14319) +@@ -30,20 +30,24 @@ + static tr_list* + node_alloc (void) + { +- tr_list * ret; ++ tr_list * ret = NULL; ++ tr_lock * lock = getRecycledNodesLock (); + +- if (recycled_nodes == NULL) ++ tr_lockLock (lock); ++ ++ if (recycled_nodes != NULL) + { +- ret = tr_new (tr_list, 1); +- } +- else +- { +- tr_lockLock (getRecycledNodesLock ()); + ret = recycled_nodes; + recycled_nodes = recycled_nodes->next; +- tr_lockUnlock (getRecycledNodesLock ()); + } + ++ tr_lockUnlock (lock); ++ ++ if (ret == NULL) ++ { ++ ret = tr_new (tr_list, 1); ++ } ++ + *ret = TR_LIST_CLEAR; + return ret; + } +@@ -51,13 +55,15 @@ + static void + node_free (tr_list* node) + { ++ tr_lock * lock = getRecycledNodesLock (); ++ + if (node != NULL) + { + *node = TR_LIST_CLEAR; +- tr_lockLock (getRecycledNodesLock ()); ++ tr_lockLock (lock); + node->next = recycled_nodes; + recycled_nodes = node; +- tr_lockUnlock (getRecycledNodesLock ()); ++ tr_lockUnlock (lock); + } + } + diff --git a/net-p2p/transmission/transmission-2.84-r2.ebuild b/net-p2p/transmission/transmission-2.84-r3.ebuild index 09d42ad10077..d605c802e4e8 100644 --- a/net-p2p/transmission/transmission-2.84-r2.ebuild +++ b/net-p2p/transmission/transmission-2.84-r3.ebuild @@ -75,6 +75,7 @@ src_prepare() { epatch "${FILESDIR}/2.84-miniupnp14.patch" epatch "${FILESDIR}/2.84-libevent-2.1.5.patch" + epatch "${FILESDIR}/2.84-node_alloc-segfault.patch" epatch_user eautoreconf |