[vino/f18] Fix a crash

Matthias Clasen mclasen at fedoraproject.org
Tue Jun 11 03:08:31 UTC 2013


commit 8779c08514a1dd433a2c24c1c6f521da42e5f702
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Mon Jun 10 22:08:14 2013 -0400

    Fix a crash
    
    Conflicts:
    	vino.spec

 vino-allocation.patch |   32 ++++++++++++++++++++++++++++++++
 vino.spec             |    7 +++++++
 2 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/vino-allocation.patch b/vino-allocation.patch
new file mode 100644
index 0000000..020f7a7
--- /dev/null
+++ b/vino-allocation.patch
@@ -0,0 +1,32 @@
+From 81b5e3780f69e7a3c465afbe6cae9712d47c7deb Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Sat, 25 May 2013 00:52:07 -0400
+Subject: [PATCH] Be more careful with memory allocation
+
+Better to 0-initialize these structs, since GetValidIGD may
+not end up filling them.
+See https://bugzilla.redhat.com/attachment.cgi?id=707491
+for a related stacktrace.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=700987
+---
+ server/vino-upnp.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/server/vino-upnp.c b/server/vino-upnp.c
+index fcccfc7..99d7a71 100644
+--- a/server/vino-upnp.c
++++ b/server/vino-upnp.c
+@@ -91,8 +91,8 @@ update_upnp_status (VinoUpnp *upnp)
+   dprintf (UPNP, "found.\n");
+   dprintf (UPNP, "UPnP: Looking for a valid IGD... ");
+ 
+-  upnp->priv->urls = g_new (struct UPNPUrls, 1);
+-  upnp->priv->data = g_new (struct IGDdatas, 1);
++  upnp->priv->urls = g_new0 (struct UPNPUrls, 1);
++  upnp->priv->data = g_new0 (struct IGDdatas, 1);
+ 
+   res = UPNP_GetValidIGD (devlist,
+ 			  upnp->priv->urls,
+-- 
+1.8.2.1
\ No newline at end of file
diff --git a/vino.spec b/vino.spec
index b6fae5d..1ec9022 100644
--- a/vino.spec
+++ b/vino.spec
@@ -10,6 +10,9 @@ URL: http://www.gnome.org
 #VCS: git:git://git.gnome.org/vino
 Source0: http://download.gnome.org/sources/vino/3.6/%{name}-%{version}.tar.xz
 
+# https://bugzilla.gnome.org/show_bug.cgi?id=700987
+Patch0: vino-allocation.patch
+
 License: GPLv2+
 Group: User Interface/Desktops
 
@@ -34,6 +37,7 @@ connect to a running GNOME session using VNC.
 
 %prep
 %setup -q
+%patch0 -p1
 
 # autoreconf -i -f
 # intltoolize --force
@@ -96,6 +100,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
 %{_datadir}/GConf/gsettings/org.gnome.Vino.convert
 
 %changelog
+* Mon Jun 10 2013 Matthias Clasen <mclasen at redhat.com> - 3.6.2-2
+- Be more careful with memory allocation
+
 * Sun Dec  2 2012 Matthias Clasen <mclasen at redhat.com> - 3.6.2-2
 - Don't add a vendor prefix to the desktop file, that breaks
   activating the preferences from the statusicon (#827913)


More information about the scm-commits mailing list