summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Mrozowski <reavertm@gentoo.org>2010-06-05 02:30:04 +0000
committerMaciej Mrozowski <reavertm@gentoo.org>2010-06-05 02:30:04 +0000
commit0d493bb831a7e8d0673f0a070a821aec3c7af74d (patch)
treea200c142608bcd00a009c5c91dbce773844df815 /net-libs/libgadu
parentapp-portage/layman: Remove ebuild for 1.1.1 (bug #322789) (diff)
downloadgentoo-2-0d493bb831a7e8d0673f0a070a821aec3c7af74d.tar.gz
gentoo-2-0d493bb831a7e8d0673f0a070a821aec3c7af74d.tar.bz2
gentoo-2-0d493bb831a7e8d0673f0a070a821aec3c7af74d.zip
Add patch from mailing list to fix memory leak on receiving messages.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'net-libs/libgadu')
-rw-r--r--net-libs/libgadu/ChangeLog8
-rw-r--r--net-libs/libgadu/files/libgadu-1.9.0-memleak.patch42
-rw-r--r--net-libs/libgadu/libgadu-1.9.0-r1.ebuild (renamed from net-libs/libgadu/libgadu-1.9.0.ebuild)11
3 files changed, 55 insertions, 6 deletions
diff --git a/net-libs/libgadu/ChangeLog b/net-libs/libgadu/ChangeLog
index 95f8d1b73736..44c81aaaa3aa 100644
--- a/net-libs/libgadu/ChangeLog
+++ b/net-libs/libgadu/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-libs/libgadu
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/libgadu/ChangeLog,v 1.38 2010/05/26 00:03:40 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libgadu/ChangeLog,v 1.39 2010/06/05 02:30:03 reavertm Exp $
+
+*libgadu-1.9.0-r1 (05 Jun 2010)
+
+ 05 Jun 2010; Maciej Mrozowski <reavertm@gentoo.org> -libgadu-1.9.0.ebuild,
+ +libgadu-1.9.0-r1.ebuild, +files/libgadu-1.9.0-memleak.patch:
+ Add patch from mailing list to fix memory leak on receiving messages.
25 May 2010; Maciej Mrozowski <reavertm@gentoo.org> libgadu-1.9.0.ebuild:
Make it POSIX compliant, remove some redundant code
diff --git a/net-libs/libgadu/files/libgadu-1.9.0-memleak.patch b/net-libs/libgadu/files/libgadu-1.9.0-memleak.patch
new file mode 100644
index 000000000000..c0cdc7785f9d
--- /dev/null
+++ b/net-libs/libgadu/files/libgadu-1.9.0-memleak.patch
@@ -0,0 +1,42 @@
+Index: src/events.c
+===================================================================
+--- src/events.c (revision 976)
++++ src/events.c (revision 987)
+@@ -72,6 +72,7 @@
+ free(e->event.msg.message);
+ free(e->event.msg.formats);
+ free(e->event.msg.recipients);
++ free(e->event.msg.xhtml_message);
+ break;
+
+ case GG_EVENT_NOTIFY:
+@@ -420,6 +421,7 @@
+ {
+ struct gg_recv_msg *r = (struct gg_recv_msg*) ((char*) h + sizeof(struct gg_header));
+ char *p, *packet_end = (char*) r + h->length;
++ int ctcp = 0;
+
+ gg_debug_session(sess, GG_DEBUG_FUNCTION, "** gg_handle_recv_msg(%p, %p);\n", h, e);
+
+@@ -438,6 +440,7 @@
+
+ if (*p == 0x02 && p == packet_end - 1) {
+ gg_debug_session(sess, GG_DEBUG_MISC, "// gg_handle_recv_msg() received ctcp packet\n");
++ ctcp = 1;
+ break;
+ }
+
+@@ -463,8 +466,12 @@
+ e->event.msg.sender = gg_fix32(r->sender);
+ e->event.msg.time = gg_fix32(r->time);
+ e->event.msg.seq = gg_fix32(r->seq);
+- e->event.msg.message = (unsigned char*) strdup((char*) r + sizeof(*r));
++ if (ctcp)
++ e->event.msg.message = (unsigned char*) strdup("\x02");
++ else
++ e->event.msg.message = (unsigned char*) strdup((char*) r + sizeof(*r));
+
++
+ return 0;
+
+ malformed:
diff --git a/net-libs/libgadu/libgadu-1.9.0.ebuild b/net-libs/libgadu/libgadu-1.9.0-r1.ebuild
index 341bfd083c11..938caf769179 100644
--- a/net-libs/libgadu/libgadu-1.9.0.ebuild
+++ b/net-libs/libgadu/libgadu-1.9.0-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/libgadu/libgadu-1.9.0.ebuild,v 1.2 2010/05/26 00:03:40 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libgadu/libgadu-1.9.0-r1.ebuild,v 1.1 2010/06/05 02:30:03 reavertm Exp $
EAPI="2"
@@ -30,6 +30,10 @@ RDEPEND="${COMMON_DEPEND}
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}/${P}-memleak.patch"
+)
+
DOCS=(AUTHORS ChangeLog NEWS README)
src_configure() {
@@ -41,14 +45,11 @@ src_configure() {
}
src_install() {
+ use doc && HTML_DOCS=(docs/html/)
base_src_install
if ! use static-libs; then
find "${D}" -type f -name '*.la' -exec rm -f {} + \
|| die "la removal failed"
fi
-
- if use doc; then
- dohtml -r docs/html/* || die "dohtml failed"
- fi
}