[spice-gtk/f17] Fix virt-manager console not showing up, rhbz#818169

Marc-André Lureau elmarco at fedoraproject.org
Wed May 2 13:46:37 UTC 2012


commit 1f8780d5c154f617fa4d76d29924d4a480c84313
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Wed May 2 15:46:15 2012 +0200

    Fix virt-manager console not showing up, rhbz#818169

 0001-Fix-parsing-URI-query.patch                   |   50 +++++++
 ...-Fix-read_uint-macros-on-big-endian-archs.patch |   69 ---------
 ...eck-for-existing-usb-channels-after-libus.patch |  154 --------------------
 spice-gtk.spec                                     |   10 +-
 4 files changed, 59 insertions(+), 224 deletions(-)
---
diff --git a/0001-Fix-parsing-URI-query.patch b/0001-Fix-parsing-URI-query.patch
new file mode 100644
index 0000000..55f6794
--- /dev/null
+++ b/0001-Fix-parsing-URI-query.patch
@@ -0,0 +1,50 @@
+From da0071300e1191f26757b4cf5146418c8b1db997 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau at redhat.com>
+Date: Wed, 2 May 2012 14:01:16 +0200
+Subject: [PATCH spice-gtk] Fix parsing URI query
+
+Do not depend on uninitialized "len" variable to set the query string.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=818169
+---
+ gtk/spice-session.c |    8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/gtk/spice-session.c b/gtk/spice-session.c
+index 959e099..b3c66ce 100644
+--- a/gtk/spice-session.c
++++ b/gtk/spice-session.c
+@@ -249,7 +249,6 @@ static int spice_uri_parse(SpiceSession *session, const char *original_uri)
+     gchar key[32], value[128];
+     gchar *host = NULL, *port = NULL, *tls_port = NULL, *uri = NULL, *password = NULL;
+     gchar **target_key;
+-    int len;
+     gchar *path = NULL;
+     gchar *authority = NULL;
+     gchar *query = NULL;
+@@ -277,12 +276,10 @@ static int spice_uri_parse(SpiceSession *session, const char *original_uri)
+ 
+     if (path) {
+         size_t prefix = strcspn(path, URI_QUERY_START);
+-        if (len)
+-            query = path + prefix;
++        query = path + prefix;
+     } else {
+         size_t prefix = strcspn(authority, URI_QUERY_START);
+-        if (len)
+-            query = authority + prefix;
++        query = authority + prefix;
+     }
+ 
+     if (query && query[0]) {
+@@ -320,6 +317,7 @@ static int spice_uri_parse(SpiceSession *session, const char *original_uri)
+     }
+ 
+     while (query && query[0] != '\0') {
++        int len;
+         if (sscanf(query, "%31[-a-zA-Z0-9]=%127[^;&]%n", key, value, &len) != 2) {
+             g_warning("Failed to parse URI query '%s'", query);
+             goto fail;
+-- 
+1.7.10
+
diff --git a/spice-gtk.spec b/spice-gtk.spec
index 3bf2fae..9bdc4f7 100644
--- a/spice-gtk.spec
+++ b/spice-gtk.spec
@@ -13,13 +13,14 @@
 
 Name:           spice-gtk
 Version:        0.12
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A GTK+ widget for SPICE clients
 
 Group:          System Environment/Libraries
 License:        LGPLv2+
 URL:            http://spice-space.org/page/Spice-Gtk
 Source0:        http://www.spice-space.org/download/gtk/%{name}-%{version}%{?_version_suffix}.tar.bz2
+Patch1:         0001-Fix-parsing-URI-query.patch
 
 BuildRequires: intltool
 BuildRequires: gtk2-devel >= 2.14
@@ -143,6 +144,10 @@ if [ -n '%{?_version_suffix}' ]; then
   mv spice-gtk-%{version}%{?_version_suffix} spice-gtk-%{version}
 fi
 
+pushd spice-gtk-%{version}
+%patch1 -p1
+popd
+
 %if %{with_gtk3}
 cp -a spice-gtk-%{version} spice-gtk3-%{version}
 %endif
@@ -253,6 +258,9 @@ rm -f %{buildroot}%{_libdir}/python*/site-packages/*.la
 %{_bindir}/spicy-stats
 
 %changelog
+* Wed May  2 2012 Marc-André Lureau <elmarco at makai.local> - 0.12-2
+- Fix virt-manager console not showing up, rhbz#818169
+
 * Tue Apr 24 2012 Marc-André Lureau <marcandre.lureau at redhat.com> - 0.12-1
 - New upstream release 0.12
 


More information about the scm-commits mailing list