From fc1282273d878d4c06edcf6a518afc8d4992e116 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 5 Aug 2010 15:00:29 +0100 Subject: [PATCH] Reset buffer pointer on connection close (rhbz 620843) --- gtk-vnc-0.4.1-close-buffer.patch | 15 +++++++++++++++ gtk-vnc.spec | 7 ++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 gtk-vnc-0.4.1-close-buffer.patch diff --git a/gtk-vnc-0.4.1-close-buffer.patch b/gtk-vnc-0.4.1-close-buffer.patch new file mode 100644 index 0000000..18d9d72 --- /dev/null +++ b/gtk-vnc-0.4.1-close-buffer.patch @@ -0,0 +1,15 @@ +diff -rup gtk-vnc-0.4.1.orig/src/vncconnection.c gtk-vnc-0.4.1.new/src/vncconnection.c +--- gtk-vnc-0.4.1.orig/src/vncconnection.c 2010-07-14 11:28:15.000000000 +0100 ++++ gtk-vnc-0.4.1.new/src/vncconnection.c 2010-08-05 14:56:40.403911911 +0100 +@@ -4191,7 +4191,10 @@ static void vnc_connection_close(VncConn + priv->name = NULL; + } + +- g_free (priv->xmit_buffer); ++ if (priv->xmit_buffer) { ++ g_free(priv->xmit_buffer); ++ priv->xmit_buffer = NULL; ++ } + + if (priv->cred_username) { + g_free(priv->cred_username); diff --git a/gtk-vnc.spec b/gtk-vnc.spec index c650823..d1a8f3d 100644 --- a/gtk-vnc.spec +++ b/gtk-vnc.spec @@ -13,10 +13,11 @@ Summary: A GTK widget for VNC clients Name: gtk-vnc Version: 0.4.1 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ Group: Development/Libraries Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.4/%{name}-%{version}.tar.bz2 +Patch1: %{name}-%{version}-close-buffer.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) URL: http://live.gnome.org/gtk-vnc BuildRequires: gtk2-devel >= 2.14 @@ -113,6 +114,7 @@ screenshots of a VNC desktop %prep %setup -q +%patch1 -p1 %build %if %{with_gir} @@ -207,6 +209,9 @@ rm -fr %{buildroot} %{_mandir}/man1/gvnccapture.1* %changelog +* Thu Aug 5 2010 Daniel P. Berrange - 0.4.1-4 +- Reset buffer pointer on connection close (rhbz 620843) + * Wed Jul 21 2010 David Malcolm - 0.4.1-3 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild