diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2011-01-14 23:03:42 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2011-01-14 23:03:42 +0000 |
commit | a948ec290732908e71cc11f1abedd9399013a089 (patch) | |
tree | 3c38e4541cb16bc431acbdedf02801467e71f1cb /net-libs | |
parent | Stable on amd64 wrt bug #349877 (diff) | |
download | historical-a948ec290732908e71cc11f1abedd9399013a089.tar.gz historical-a948ec290732908e71cc11f1abedd9399013a089.tar.bz2 historical-a948ec290732908e71cc11f1abedd9399013a089.zip |
Fix several more upstream discovered crashers and interaction bugs.
Package-Manager: portage-2.1.9.31/cvs/Linux x86_64
Diffstat (limited to 'net-libs')
-rw-r--r-- | net-libs/gtk-vnc/ChangeLog | 11 | ||||
-rw-r--r-- | net-libs/gtk-vnc/Manifest | 7 | ||||
-rw-r--r-- | net-libs/gtk-vnc/files/gtk-vnc-0.4.2-fb-bounds-fix.patch | 78 | ||||
-rw-r--r-- | net-libs/gtk-vnc/files/gtk-vnc-0.4.2-gnutls-crash-fix.patch | 62 | ||||
-rw-r--r-- | net-libs/gtk-vnc/files/gtk-vnc-0.4.2-pre-conn-crash-fix.patch | 36 | ||||
-rw-r--r-- | net-libs/gtk-vnc/files/gtk-vnc-0.4.2-shared-flag.patch | 34 | ||||
-rw-r--r-- | net-libs/gtk-vnc/gtk-vnc-0.4.2-r2.ebuild | 66 |
7 files changed, 292 insertions, 2 deletions
diff --git a/net-libs/gtk-vnc/ChangeLog b/net-libs/gtk-vnc/ChangeLog index 56199fc65ec3..429d8d351c71 100644 --- a/net-libs/gtk-vnc/ChangeLog +++ b/net-libs/gtk-vnc/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-libs/gtk-vnc # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/gtk-vnc/ChangeLog,v 1.55 2011/01/13 22:08:01 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/gtk-vnc/ChangeLog,v 1.56 2011/01/14 23:03:42 cardoe Exp $ + +*gtk-vnc-0.4.2-r2 (14 Jan 2011) + + 14 Jan 2011; Doug Goldstein <cardoe@gentoo.org> +gtk-vnc-0.4.2-r2.ebuild, + +files/gtk-vnc-0.4.2-fb-bounds-fix.patch, + +files/gtk-vnc-0.4.2-gnutls-crash-fix.patch, + +files/gtk-vnc-0.4.2-pre-conn-crash-fix.patch, + +files/gtk-vnc-0.4.2-shared-flag.patch: + Fix several more upstream discovered crashers and interaction bugs. *gtk-vnc-0.4.2-r1 (13 Jan 2011) diff --git a/net-libs/gtk-vnc/Manifest b/net-libs/gtk-vnc/Manifest index a3614b0946b6..a39f0b2c9b13 100644 --- a/net-libs/gtk-vnc/Manifest +++ b/net-libs/gtk-vnc/Manifest @@ -1,10 +1,15 @@ +AUX gtk-vnc-0.4.2-fb-bounds-fix.patch 3099 RMD160 cc591f16e3356e73079cf054465e54dfa78eb279 SHA1 8ecc272829ca60ab7741329dc4fdfe619ce21f81 SHA256 0e2432f8bfa37eb24a160ae7d210c9781b4be40dcb23ca4093cc89e43eeabbf3 +AUX gtk-vnc-0.4.2-gnutls-crash-fix.patch 1977 RMD160 267f4da2c0fc2752367afb6496f7b1abec228b1b SHA1 ec2edac831ad3939d294f8e80c8f37834aca01d4 SHA256 8ae22b88874ff40db314739c1d435925466cf014c570a761b5ffb20a4edb27aa AUX gtk-vnc-0.4.2-memory-leak-fix.patch 1464 RMD160 a6e0239731cda4b7e2cf67b9ed5cf7ca27a3e2f9 SHA1 60f62e3a9e8aba1418c8dbb531b2479b6c85ce1c SHA256 d5983864034c113fb148128e3061f4cc8fb80e7952a7b0e35d9ce46078bab75d +AUX gtk-vnc-0.4.2-pre-conn-crash-fix.patch 1276 RMD160 dde15c2c910d36a1b37b75a67312598ba7202f23 SHA1 a2cb10cb9553f77184e3c5e56c9a63fc7229af7b SHA256 277c2205469e128fedacb59a5edc39c21ed5ea2bb26da1f229992488a0974dd5 +AUX gtk-vnc-0.4.2-shared-flag.patch 1085 RMD160 2bee1cf8483328edf5b05e033ab734d944e11367 SHA1 822ec5312995034d41355a3f0f1e3476d6b6f3cb SHA256 65e86adec082c3423b7f3770eed12fa55876f36b56ba9b9876b7ca7041f0bc97 DIST gtk-vnc-0.3.10.tar.bz2 495399 RMD160 c40c2811186eb13adfce6a91d7cf122a43b27fe0 SHA1 46781ed6a6e95a7dda223084feed07cd2e2679b5 SHA256 3d92db46341cdd3f2f8e84c7a13d2e2d471167b333cfc838d268d2ce8513dd22 DIST gtk-vnc-0.4.1.tar.bz2 536411 RMD160 29872bb4cd35289930f8f136b0755d582731b2dc SHA1 44e94a43094a40651507df9628a39d7dac217b0e SHA256 095ae7c98ddba0db39845b516b49651a134c7ed8b45ccd02ed1ba3fd66645b57 DIST gtk-vnc-0.4.2.tar.bz2 438062 RMD160 ba5d81a3ef4b6d6eb0322bfdc51014df38ee6c7b SHA1 8aa76bbb6a47951d4692ebb1ac241fa7b3bda2ef SHA256 96e948b62984a1a3a32fd83793fb645c493c1bc93b303eb831ecafee01a956d2 EBUILD gtk-vnc-0.3.10.ebuild 1190 RMD160 367f2cf7717df7538faa771e1c9d0889f77ce25d SHA1 68f4641776c674763e4d59dd163b4524e740c4d0 SHA256 d1e0ca0b92f729f659cdd6031cb9e7b96cd27c5c8216693675e4955c9a7acfe0 EBUILD gtk-vnc-0.4.1.ebuild 1176 RMD160 c19bc7ac1a0dbaa59702d43bb4b90be241a36261 SHA1 ff55dc49961b06cfdbb2f716230760d894de17f5 SHA256 f5e340d26cad3935135808d1c96cd572e223ad89d4cac11ecd79272ba5ec97bb EBUILD gtk-vnc-0.4.2-r1.ebuild 1495 RMD160 94f3a29f020c1ea4c4687f664b3cf2621900f7f7 SHA1 41995168382bc4a3cbd996e2edb28cb60bf29956 SHA256 84918385674c2a3de8a33ebff2ae4448f4c22f4fc7ee79e1abf676caf5be796c +EBUILD gtk-vnc-0.4.2-r2.ebuild 1689 RMD160 5e96bdb84a4024f46130ce0f2fd6e1c5d517dc31 SHA1 475b0d13800590f24a7121d124a7af22ea236385 SHA256 dbdb532d1c55d5e4f29b7b189fb35d15e459a210c67c7a57eb0434cefedc97ae EBUILD gtk-vnc-0.4.2.ebuild 1421 RMD160 a4f5a2bdfefa2eba280faf655dfd841224f0be5a SHA1 e0482a4e927b5392fd2d49a76dc6c18abf7be76f SHA256 9752beb3b4d8aa2735f104ae2852d70c20b70ae02ea18146c595e07e5c9dff8f -MISC ChangeLog 7913 RMD160 9a878dcc40a0d402e4c2569f21d04f18b69568f3 SHA1 e65be6d87c9ba2a89ad92ac212a7002ea87b4a1e SHA256 b3b1fbe2a6da55d2cf0497926af17675da5bc1eeaae5dc675af86a0e48d65078 +MISC ChangeLog 8275 RMD160 8c7eec8309abb804c0abb38939e04174461cd587 SHA1 f36429fd414a72af52bab3130a54c358aad09b11 SHA256 34557506630484453104db21f46e20a07f9717817f2b82c94175b4734d0fe6b6 MISC metadata.xml 272 RMD160 49e05d4e55e5eb2d747b6efbc6cb9f452e9d99ce SHA1 931c4f687ac318310d20406593981c75bf79fbfd SHA256 36324a1ed74c94fadbfecc0abe90d933d6b6a06ded870441cc3f555998ff9878 diff --git a/net-libs/gtk-vnc/files/gtk-vnc-0.4.2-fb-bounds-fix.patch b/net-libs/gtk-vnc/files/gtk-vnc-0.4.2-fb-bounds-fix.patch new file mode 100644 index 000000000000..c983456dcbf4 --- /dev/null +++ b/net-libs/gtk-vnc/files/gtk-vnc-0.4.2-fb-bounds-fix.patch @@ -0,0 +1,78 @@ +From f3fc5e57a78d4be9872f1394f697b9929873a737 Mon Sep 17 00:00:00 2001 +From: Daniel P. Berrange <dan@berrange.com> +Date: Tue, 23 Nov 2010 22:59:37 +0000 +Subject: Fix framebuffer update boundary check + +Framebuffer boundary checks need to take into account offset, +in addition to width/height + +* src/vncconnection.c: Fix boundary check +--- +diff --git a/src/vncconnection.c b/src/vncconnection.c +index 433256a..165a5f1 100644 +--- a/src/vncconnection.c ++++ b/src/vncconnection.c +@@ -2653,13 +2653,14 @@ static void vnc_connection_ext_key_event(VncConnection *conn) + + + static gboolean vnc_connection_validate_boundary(VncConnection *conn, ++ guint16 x, guint16 y, + guint16 width, guint16 height) + { + VncConnectionPrivate *priv = conn->priv; + +- if (width > priv->width || height > priv->height) { +- VNC_DEBUG("Framebuffer update %dx%d outside boundary %dx%d", +- width, height, priv->width, priv->height); ++ if ((x + width) > priv->width || (y + height) > priv->height) { ++ VNC_DEBUG("Framebuffer update %dx%d at %d,%d outside boundary %dx%d", ++ width, height, x, y, priv->width, priv->height); + priv->has_error = TRUE; + } + +@@ -2681,37 +2682,37 @@ static gboolean vnc_connection_framebuffer_update(VncConnection *conn, gint32 et + + switch (etype) { + case VNC_CONNECTION_ENCODING_RAW: +- if (!vnc_connection_validate_boundary(conn, width, height)) ++ if (!vnc_connection_validate_boundary(conn, x, y, width, height)) + break; + vnc_connection_raw_update(conn, x, y, width, height); + vnc_connection_update(conn, x, y, width, height); + break; + case VNC_CONNECTION_ENCODING_COPY_RECT: +- if (!vnc_connection_validate_boundary(conn, width, height)) ++ if (!vnc_connection_validate_boundary(conn, x, y, width, height)) + break; + vnc_connection_copyrect_update(conn, x, y, width, height); + vnc_connection_update(conn, x, y, width, height); + break; + case VNC_CONNECTION_ENCODING_RRE: +- if (!vnc_connection_validate_boundary(conn, width, height)) ++ if (!vnc_connection_validate_boundary(conn, x, y, width, height)) + break; + vnc_connection_rre_update(conn, x, y, width, height); + vnc_connection_update(conn, x, y, width, height); + break; + case VNC_CONNECTION_ENCODING_HEXTILE: +- if (!vnc_connection_validate_boundary(conn, width, height)) ++ if (!vnc_connection_validate_boundary(conn, x, y, width, height)) + break; + vnc_connection_hextile_update(conn, x, y, width, height); + vnc_connection_update(conn, x, y, width, height); + break; + case VNC_CONNECTION_ENCODING_ZRLE: +- if (!vnc_connection_validate_boundary(conn, width, height)) ++ if (!vnc_connection_validate_boundary(conn, x, y, width, height)) + break; + vnc_connection_zrle_update(conn, x, y, width, height); + vnc_connection_update(conn, x, y, width, height); + break; + case VNC_CONNECTION_ENCODING_TIGHT: +- if (!vnc_connection_validate_boundary(conn, width, height)) ++ if (!vnc_connection_validate_boundary(conn, x, y, width, height)) + break; + vnc_connection_tight_update(conn, x, y, width, height); + vnc_connection_update(conn, x, y, width, height); +-- +cgit v0.8.3.1 diff --git a/net-libs/gtk-vnc/files/gtk-vnc-0.4.2-gnutls-crash-fix.patch b/net-libs/gtk-vnc/files/gtk-vnc-0.4.2-gnutls-crash-fix.patch new file mode 100644 index 000000000000..d9dff3e80d34 --- /dev/null +++ b/net-libs/gtk-vnc/files/gtk-vnc-0.4.2-gnutls-crash-fix.patch @@ -0,0 +1,62 @@ +From 5760a2a28d85cb79e39063cfd8ee8aee975caf24 Mon Sep 17 00:00:00 2001 +From: Daniel P. Berrange <dan@berrange.com> +Date: Mon, 22 Nov 2010 21:44:56 +0000 +Subject: Avoid crash in TLS cleanup code on shutdown + +The gnutls_bye() method may try to send data on the socket todo +graceful TLS shutdown. The priv->sock variable is possibly +already NULL at this point if the close was triggered via the +vnc_connection_shutdown() method. Change the latter so that +it only calls g_socket_close, not actually free'ing the +priv->sock object immediately. Also put sanity check code in +the TLS push/pull functions to catch future bugs in this area +--- +diff --git a/src/vncconnection.c b/src/vncconnection.c +index 4a0c53c..433256a 100644 +--- a/src/vncconnection.c ++++ b/src/vncconnection.c +@@ -939,6 +939,12 @@ static ssize_t vnc_connection_tls_push(gnutls_transport_ptr_t transport, + int ret; + GError *error = NULL; + ++ if (!priv->sock) { ++ VNC_DEBUG("Unexpected TLS push on closed socket"); ++ errno = EBADF; ++ return -1; ++ } ++ + ret = g_socket_send(priv->sock, data, len, NULL, &error); + if (ret < 0) { + if (error) { +@@ -962,6 +968,12 @@ static ssize_t vnc_connection_tls_pull(gnutls_transport_ptr_t transport, + int ret; + GError *error = NULL; + ++ if (!priv->sock) { ++ VNC_DEBUG("Unexpected TLS pull on closed socket"); ++ errno = EBADF; ++ return -1; ++ } ++ + ret = g_socket_receive(priv->sock, data, len, NULL, &error); + if (ret < 0) { + if (error) { +@@ -4461,11 +4473,12 @@ void vnc_connection_shutdown(VncConnection *conn) + VNC_DEBUG("Waking up couroutine to shutdown gracefully"); + g_io_wakeup(&priv->wait); + +- if (priv->sock) { ++ /* Closing the socket triggers an I/O error in the ++ * event loop resulting...eventually.. in a call ++ * to vnc_connection_close for full cleanup ++ */ ++ if (priv->sock) + g_socket_close(priv->sock, NULL); +- g_object_unref(priv->sock); +- priv->sock = NULL; +- } + } + + gboolean vnc_connection_is_open(VncConnection *conn) +-- +cgit v0.8.3.1 diff --git a/net-libs/gtk-vnc/files/gtk-vnc-0.4.2-pre-conn-crash-fix.patch b/net-libs/gtk-vnc/files/gtk-vnc-0.4.2-pre-conn-crash-fix.patch new file mode 100644 index 000000000000..e3a77c11886e --- /dev/null +++ b/net-libs/gtk-vnc/files/gtk-vnc-0.4.2-pre-conn-crash-fix.patch @@ -0,0 +1,36 @@ +From f23f0ebf1b659208d5036e10ab1f32249a2e1a4c Mon Sep 17 00:00:00 2001 +From: Daniel P. Berrange <dan@berrange.com> +Date: Mon, 22 Nov 2010 21:18:29 +0000 +Subject: Avoid crash in motion event & vnc_display_get_pixbuf + +If a mouse event occurs before a connection completes setup +priv->fb will be NULL and a crash can occur. Likewise if +vnc_display_get_pixbuf() is called before priv->fb is set, +then a crash occurs. Add checks for NULL in both cases +--- +diff --git a/src/vncdisplay.c b/src/vncdisplay.c +index 55fbcf4..0b7e800 100644 +--- a/src/vncdisplay.c ++++ b/src/vncdisplay.c +@@ -557,6 +557,9 @@ static gboolean motion_event(GtkWidget *widget, GdkEventMotion *motion) + if (priv->conn == NULL || !vnc_connection_is_initialized(priv->conn)) + return FALSE; + ++ if (!priv->fb) ++ return FALSE; ++ + fbw = vnc_framebuffer_get_width(VNC_FRAMEBUFFER(priv->fb)); + fbh = vnc_framebuffer_get_height(VNC_FRAMEBUFFER(priv->fb)); + +@@ -2050,6 +2053,9 @@ GdkPixbuf *vnc_display_get_pixbuf(VncDisplay *obj) + !vnc_connection_is_initialized(priv->conn)) + return NULL; + ++ if (!priv->fb) ++ return NULL; ++ + fb = VNC_FRAMEBUFFER(priv->fb); + surface = vnc_cairo_framebuffer_get_surface(priv->fb); + content = cairo_surface_get_content(surface) | CAIRO_CONTENT_COLOR; +-- +cgit v0.8.3.1 diff --git a/net-libs/gtk-vnc/files/gtk-vnc-0.4.2-shared-flag.patch b/net-libs/gtk-vnc/files/gtk-vnc-0.4.2-shared-flag.patch new file mode 100644 index 000000000000..16d5cd9017f7 --- /dev/null +++ b/net-libs/gtk-vnc/files/gtk-vnc-0.4.2-shared-flag.patch @@ -0,0 +1,34 @@ +From ba169973b875f90bf787158588ee4258b71a6ba6 Mon Sep 17 00:00:00 2001 +From: SĂ©bastien Granjoux <seb.sfo@free.fr> +Date: Thu, 13 Jan 2011 16:36:33 +0000 +Subject: Fix setup of 'shared flag' when opening connection + +The VncDisplay class forgot to pass the 'shared flag' onto +the VncConnection class when establishing a connection +--- +diff --git a/src/vncdisplay.c b/src/vncdisplay.c +index deab4d8..f8ee9ea 100644 +--- a/src/vncdisplay.c ++++ b/src/vncdisplay.c +@@ -1407,6 +1407,9 @@ gboolean vnc_display_open_fd(VncDisplay *obj, int fd) + if (vnc_connection_is_open(priv->conn)) + return FALSE; + ++ if (!vnc_connection_set_shared(priv->conn, priv->shared_flag)) ++ return FALSE; ++ + if (!vnc_connection_open_fd(priv->conn, fd)) + return FALSE; + +@@ -1422,6 +1425,9 @@ gboolean vnc_display_open_host(VncDisplay *obj, const char *host, const char *po + if (vnc_connection_is_open(priv->conn)) + return FALSE; + ++ if (!vnc_connection_set_shared(priv->conn, priv->shared_flag)) ++ return FALSE; ++ + if (!vnc_connection_open_host(priv->conn, host, port)) + return FALSE; + +-- +cgit v0.8.3.1 diff --git a/net-libs/gtk-vnc/gtk-vnc-0.4.2-r2.ebuild b/net-libs/gtk-vnc/gtk-vnc-0.4.2-r2.ebuild new file mode 100644 index 000000000000..6fe192f30f58 --- /dev/null +++ b/net-libs/gtk-vnc/gtk-vnc-0.4.2-r2.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-libs/gtk-vnc/gtk-vnc-0.4.2-r2.ebuild,v 1.1 2011/01/14 23:03:42 cardoe Exp $ + +EAPI="2" +PYTHON_DEPEND="python? 2:2.4" + +inherit base gnome.org python + +DESCRIPTION="VNC viewer widget for GTK." +HOMEPAGE="http://live.gnome.org/gtk-vnc" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="examples +introspection python sasl" + +# libview is used in examples/gvncviewer -- no need +# TODO: review nsplugin when it will be considered less experimental + +RDEPEND=">=dev-libs/glib-2.10:2 + >=net-libs/gnutls-1.4 + >=x11-libs/cairo-1.2 + >=x11-libs/gtk+-2.18:2 + x11-libs/libX11 + introspection? ( >=dev-libs/gobject-introspection-0.9.4 ) + python? ( >=dev-python/pygtk-2:2 ) + sasl? ( dev-libs/cyrus-sasl )" +DEPEND="${RDEPEND} + >=dev-lang/perl-5 + dev-perl/Text-CSV + dev-util/pkgconfig + sys-devel/gettext + >=dev-util/intltool-0.40" + +pkg_setup() { + python_set_active_version 2 +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-pre-conn-crash-fix.patch + epatch "${FILESDIR}"/${P}-gnutls-crash-fix.patch + epatch "${FILESDIR}"/${P}-fb-bounds-fix.patch + epatch "${FILESDIR}"/${P}-memory-leak-fix.patch + epatch "${FILESDIR}"/${P}-shared-flag.patch +} + +src_configure() { + econf \ + $(use_with examples) \ + $(use_enable introspection) \ + $(use_with python) \ + $(use_with sasl) \ + --with-coroutine=gthread \ + --without-libview \ + --with-gtk=2.0 \ + --disable-static +} + +src_install() { + # bug #328273 + MAKEOPTS="${MAKEOPTS} -j1" \ + base_src_install + python_clean_installation_image + dodoc AUTHORS ChangeLog NEWS README || die +} |