Add patch to fix crash when configuring remote printers

This commit is contained in:
Michael Catanzaro 2019-10-02 13:08:55 -05:00
parent 4d0899857a
commit f8b0e42dd1
2 changed files with 43 additions and 1 deletions

36
579.patch Normal file
View File

@ -0,0 +1,36 @@
From e497ad900d66b796935872baf837850a77155b4a Mon Sep 17 00:00:00 2001
From: Felipe Borges <felipeborges@gnome.org>
Date: Tue, 1 Oct 2019 16:45:59 +0200
Subject: [PATCH] printers: Check whether URI is valid while searching for
printers
Fixes #679
---
panels/printers/pp-new-printer-dialog.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/panels/printers/pp-new-printer-dialog.c b/panels/printers/pp-new-printer-dialog.c
index 93e95e9a8..651c0d8f3 100644
--- a/panels/printers/pp-new-printer-dialog.c
+++ b/panels/printers/pp-new-printer-dialog.c
@@ -1607,13 +1607,16 @@ search_address (const gchar *text,
if (text && text[0] != '\0')
{
+ g_autoptr(GSocketConnectable) conn;
gchar *scheme = NULL;
gchar *host = NULL;
gint port;
parse_uri (text, &scheme, &host, &port);
- if (host)
+ conn = g_network_address_parse_uri (host, port, NULL);
+
+ if (host != NULL && conn != NULL)
{
THostSearchData *search_data;
--
2.22.0

View File

@ -10,7 +10,7 @@
Name: gnome-control-center
Version: 3.34.0.1
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Utilities to configure the GNOME desktop
License: GPLv2+ and CC-BY-SA
@ -20,6 +20,9 @@ Source0: https://download.gnome.org/sources/gnome-control-center/3.34/gno
# https://bugzilla.gnome.org/show_bug.cgi?id=695691
Patch0: distro-logo.patch
# https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/579
Patch1: 579.patch
BuildRequires: chrpath
BuildRequires: cups-devel
BuildRequires: desktop-file-utils
@ -189,6 +192,9 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gnome-control-center
%dir %{_datadir}/gnome/wm-properties
%changelog
* Wed Oct 02 2019 Michael Catanzaro <mcatanzaro@gnome.org> - 3.34.0.1-2
- Add patch to fix crash when configuring remote printers
* Mon Sep 09 2019 Kalev Lember <klember@redhat.com> - 3.34.0.1-1
- Update to 3.34.0.1