Gentoo Archives: gentoo-commits

From: Priit Laes <plaes@×××××.org>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:master commit in: net-libs/glib-networking/, net-libs/glib-networking/files/
Date: Sun, 29 Jan 2012 08:26:35
Message-Id: bc231552d1a7c16797b801e291369cb3882f0265.plaes@gentoo
1 commit: bc231552d1a7c16797b801e291369cb3882f0265
2 Author: Priit Laes <plaes <AT> plaes <DOT> org>
3 AuthorDate: Sun Jan 29 08:22:47 2012 +0000
4 Commit: Priit Laes <plaes <AT> plaes <DOT> org>
5 CommitDate: Sun Jan 29 08:22:47 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=bc231552
7
8 net-libs/glib-networking: Add patch against crasher in TLS code
9
10 ---
11 .../glib-networking/files/tls-async-crasher.patch | 33 ++++++++++++++++++++
12 .../glib-networking/glib-networking-2.31.6.ebuild | 4 ++
13 2 files changed, 37 insertions(+), 0 deletions(-)
14
15 diff --git a/net-libs/glib-networking/files/tls-async-crasher.patch b/net-libs/glib-networking/files/tls-async-crasher.patch
16 new file mode 100644
17 index 0000000..4ea8eb1
18 --- /dev/null
19 +++ b/net-libs/glib-networking/files/tls-async-crasher.patch
20 @@ -0,0 +1,33 @@
21 +From 51938b5e9771095f1d0feb1cab3e6d402ca7f6da Mon Sep 17 00:00:00 2001
22 +From: Dan Winship <danw@×××××.org>
23 +Date: Thu, 26 Jan 2012 12:56:51 +0000
24 +Subject: gnutls: fix an async handshake crash
25 +
26 +g_tls_connection_gnutls_handshake_async() would cause a crash if the
27 +handshake either succeeded or failed immediately (rather than getting
28 +an EAGAIN after making partial progress).
29 +
30 +https://bugzilla.gnome.org/show_bug.cgi?id=658771
31 +---
32 +diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
33 +index f1655d6..4bed055 100644
34 +--- a/tls/gnutls/gtlsconnection-gnutls.c
35 ++++ b/tls/gnutls/gtlsconnection-gnutls.c
36 +@@ -969,6 +969,7 @@ g_tls_connection_gnutls_handshake_async (GTlsConnection *conn,
37 + g_simple_async_result_set_op_res_gboolean (simple, TRUE);
38 + g_simple_async_result_complete_in_idle (simple);
39 + g_object_unref (simple);
40 ++ return;
41 + }
42 + else if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK))
43 + {
44 +@@ -976,6 +977,7 @@ g_tls_connection_gnutls_handshake_async (GTlsConnection *conn,
45 + g_error_free (error);
46 + g_simple_async_result_complete_in_idle (simple);
47 + g_object_unref (simple);
48 ++ return;
49 + }
50 + else if (error)
51 + g_error_free (error);
52 +--
53 +cgit v0.9.0.2
54
55 diff --git a/net-libs/glib-networking/glib-networking-2.31.6.ebuild b/net-libs/glib-networking/glib-networking-2.31.6.ebuild
56 index cf94aa7..10a0261 100644
57 --- a/net-libs/glib-networking/glib-networking-2.31.6.ebuild
58 +++ b/net-libs/glib-networking/glib-networking-2.31.6.ebuild
59 @@ -31,6 +31,10 @@ DEPEND="${RDEPEND}
60 test? ( sys-apps/dbus[X] )"
61 # eautoreconf needs >=sys-devel/autoconf-2.65:2.5
62
63 +src_prepare() {
64 + epatch "${FILESDIR}/tls-async-crasher.patch"
65 +}
66 +
67 pkg_setup() {
68 # AUTHORS, ChangeLog are empty
69 DOCS="NEWS README"