import spice-gtk-0.38-4.el8

This commit is contained in:
CentOS Sources 2020-11-10 14:09:53 +00:00 committed by Andrew Lukoshko
parent 08d6fac5f9
commit ad7fca8461
4 changed files with 188 additions and 2 deletions

View File

@ -0,0 +1,74 @@
From 95f6f22c4fee847cdf84465107561b94a5c10782 Mon Sep 17 00:00:00 2001
From: Frediano Ziglio <freddy77@gmail.com>
Date: Thu, 27 Aug 2020 17:20:06 +0100
Subject: [PATCH] Remove some warnings from Clang static analyzer
qmp-port.c:
warning: Although the value stored to 'node' is used in the enclosing
expression, the value is never actually read from 'node'
usb-backend.c:
warning: Value stored to 'done' is never read
warning: Use of memory after it is freed
usb-device-cd.c:
warning: Value stored to 'error' is never read
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
---
src/qmp-port.c | 2 +-
src/usb-backend.c | 3 +--
src/usb-device-cd.c | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/qmp-port.c b/src/qmp-port.c
index 25ab1d1..f0cbbc7 100644
--- a/src/qmp-port.c
+++ b/src/qmp-port.c
@@ -104,7 +104,7 @@ spice_qmp_dispatch_message(SpiceQmpPort *self)
return TRUE;
}
- if ((node = json_object_get_member(obj, "error"))) {
+ if (json_object_get_member(obj, "error") != NULL) {
gint id = json_object_get_int_member(obj, "id");
const gchar *desc = json_object_get_string_member(obj, "desc");
diff --git a/src/usb-backend.c b/src/usb-backend.c
index 5d3912b..a4a5f0a 100644
--- a/src/usb-backend.c
+++ b/src/usb-backend.c
@@ -867,7 +867,6 @@ usbredir_control_packet(void *priv, uint64_t id, struct usb_redir_control_packet
if (!done) {
device_ops(edev)->control_request(edev, data, data_len, &response, &out_buffer);
- done = TRUE;
}
if (response.status) {
@@ -1367,8 +1366,8 @@ void spice_usb_backend_channel_delete(SpiceUsbBackendChannel *ch)
free(ch->rules);
}
+ SPICE_DEBUG("%s << %p", __FUNCTION__, ch);
g_free(ch);
- SPICE_DEBUG("%s << %p", __FUNCTION__, ch);
}
void
diff --git a/src/usb-device-cd.c b/src/usb-device-cd.c
index 1aa553a..b9fa317 100644
--- a/src/usb-device-cd.c
+++ b/src/usb-device-cd.c
@@ -150,7 +150,7 @@ static int cd_device_load(SpiceCdLU *unit, gboolean load)
if (load) {
error = ioctl(fd, CDROMCLOSETRAY, 0);
} else {
- error = ioctl(fd, CDROM_LOCKDOOR, 0);
+ ioctl(fd, CDROM_LOCKDOOR, 0);
error = ioctl(fd, CDROMEJECT, 0);
}
if (error) {
--
2.28.0

View File

@ -0,0 +1,66 @@
From c39cc1b1ef5165523f3394f06a65cc9a6c65b7ae Mon Sep 17 00:00:00 2001
From: Frediano Ziglio <freddy77@gmail.com>
Date: Thu, 27 Aug 2020 17:57:36 +0100
Subject: [PATCH] ssl_verify: Do not check IP if we fail to resolve it
There's no point on checking an empty IP address, an IP
address is never empty.
This also solve some compiler warnings trying to possibly
pass a NULL pointer to memcmp or setting a variable without
reading it.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Uri Lublin <uril@redhat.com>
---
common/ssl_verify.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/subprojects/spice-common/common/ssl_verify.c b/subprojects/spice-common/common/ssl_verify.c
index dee719f..9ee8059 100644
--- a/subprojects/spice-common/common/ssl_verify.c
+++ b/subprojects/spice-common/common/ssl_verify.c
@@ -196,21 +196,22 @@ static int verify_hostname(X509* cert, const char *hostname)
return 1;
}
} else if (name->type == GEN_IPADD) {
- GInetAddress * ip = NULL;
- const guint8 * ip_binary = NULL;
- int alt_ip_len = 0;
- int ip_len = 0;
+ GInetAddress * ip;
+ const guint8 * ip_binary;
+ int alt_ip_len;
+ int ip_len;
found_dns_name = 1;
ip = g_inet_address_new_from_string(hostname);
- if (ip != NULL) {
- ip_len = g_inet_address_get_native_size(ip);
- ip_binary = g_inet_address_to_bytes(ip);
- } else {
+ if (ip == NULL) {
spice_warning("Could not parse hostname: %s", hostname);
+ continue;
}
+ ip_len = g_inet_address_get_native_size(ip);
+ ip_binary = g_inet_address_to_bytes(ip);
+
alt_ip_len = ASN1_STRING_length(name->d.iPAddress);
if ((ip_len == alt_ip_len) &&
@@ -229,9 +230,7 @@ static int verify_hostname(X509* cert, const char *hostname)
GENERAL_NAMES_free(subject_alt_names);
return 1;
}
- if (ip != NULL) {
- g_object_unref(ip);
- }
+ g_object_unref(ip);
}
}
GENERAL_NAMES_free(subject_alt_names);
--
2.28.0

View File

@ -0,0 +1,37 @@
From afc5872bff1eb327dd299bacdc4eec5e26d37a10 Mon Sep 17 00:00:00 2001
From: Frediano Ziglio <freddy77@gmail.com>
Date: Wed, 23 Sep 2020 17:05:01 +0100
Subject: [PATCH] usb-backend: Fix spice-usbredir-redirect-on-connect option
After commit 3e20f17b90598e740c4e274b81d99f28187da800 (cfr
"usb-redir: extend USB backend to support emulated devices")
this option stopped working, as devices are not redirected.
Data for device to guest were not written during initialisation.
With this fix both spice-usbredir-redirect-on-connect and
spice-share-cd are working (even together).
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1874740.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Uri Lublin <uril@redhat.com>
---
src/usb-backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/usb-backend.c b/src/usb-backend.c
index a4a5f0a..857488e 100644
--- a/src/usb-backend.c
+++ b/src/usb-backend.c
@@ -418,7 +418,7 @@ static void usbredir_write_flush_callback(void *user_data)
return;
}
if (is_channel_ready(ch->usbredir_channel)) {
- if (ch->state == USB_CHANNEL_STATE_HOST) {
+ if (ch->state != USB_CHANNEL_STATE_PARSER && ch->usbredirhost != NULL) {
SPICE_DEBUG("%s ch %p -> usbredirhost", __FUNCTION__, ch);
usbredirhost_write_guest_data(ch->usbredirhost);
} else {
--
2.28.0

View File

@ -2,7 +2,7 @@
Name: spice-gtk
Version: 0.38
Release: 3%{?dist}
Release: 4%{?dist}
Summary: A GTK+ widget for SPICE clients
Group: System Environment/Libraries
@ -25,6 +25,9 @@ Patch0010: 0010-quic-Check-we-have-some-data-to-start-decoding-quic-.patch
Patch0011: 0011-quic-Check-image-size-in-quic_decode_begin.patch
Patch0012: 0012-quic-Check-RLE-lengths.patch
Patch0013: 0013-quic-Avoid-possible-buffer-overflow-in-find_bucket.patch
Patch0014: 0014-Remove-some-warnings-from-Clang-static-analyzer.patch
Patch0015: 0015-ssl_verify-Do-not-check-IP-if-we-fail-to-resolve-it.patch
Patch0016: 0016-usb-backend-Fix-spice-usbredir-redirect-on-connect-o.patch
BuildRequires: meson
BuildRequires: git-core
@ -193,11 +196,17 @@ gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
%{_bindir}/spicy-stats
%changelog
* Mon Nov 9 18:01:40 IST 2020 Uri Lublin <uril@redhat.com> - 0.38-4
- Fix some static analyzer issues
Resolves: rhbz#1839104
- Fix spice-usbredir-redirect-on-connect
Resolves: rhbz#1874740
* Mon Jun 1 2020 Frediano Ziglio <fziglio@redhat.com> - 0.38-3
- Fix multiple buffer overflows in QUIC decoding code
Resolves: rhbz#1842472
* Tue May 20 2020 Victor Toso <victortoso@redhat.com> - 0.38-2
* Wed May 20 2020 Victor Toso <victortoso@redhat.com> - 0.38-2
- Brings some post releases fixes and disables celt051 that is
deprecated in spice-protocol 0.14.2
- Possibly related to rhbz#1688737 rhbz#1746239