Compare commits
12 Commits
a0617b1da9
...
3bb9f442a3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3bb9f442a3 | ||
|
|
bfffa6c169 | ||
|
|
c67fd873bf | ||
|
|
28642e997b | ||
|
|
dc09727a95 | ||
|
|
1c65859d63 | ||
|
|
cf02e4b0d7 | ||
|
|
2890d6210f | ||
|
|
6745172f09 | ||
|
|
7a4261f7dd | ||
|
|
adeb4b1b8f | ||
|
|
f153dcc6ad |
29
ServiceProxy-Remove-bogos-function-rename.patch
Normal file
29
ServiceProxy-Remove-bogos-function-rename.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 1ffff315ca395a549702b203cfac8410a3afc560 Mon Sep 17 00:00:00 2001
|
||||
From: Jens Georg <mail@jensge.org>
|
||||
Date: Sun, 14 Feb 2021 15:43:32 +0100
|
||||
Subject: [PATCH] ServiceProxy: Remove bogos function rename
|
||||
|
||||
Leftover from when this function was called
|
||||
gupnp_service_proxy_send_action_list_gi
|
||||
|
||||
Fixes #23
|
||||
---
|
||||
libgupnp/gupnp-service-proxy.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
|
||||
index 8720ce6..cec7c8a 100644
|
||||
--- a/libgupnp/gupnp-service-proxy.c
|
||||
+++ b/libgupnp/gupnp-service-proxy.c
|
||||
@@ -481,7 +481,7 @@ out:
|
||||
}
|
||||
|
||||
/**
|
||||
- * gupnp_service_proxy_send_action_list: (rename-to gupnp_service_proxy_send_action_list)
|
||||
+ * gupnp_service_proxy_send_action_list:
|
||||
* @proxy: (transfer none) : A #GUPnPServiceProxy
|
||||
* @action: An action
|
||||
* @in_names: (element-type utf8) (transfer none): #GList of 'in' parameter
|
||||
--
|
||||
2.27.0
|
||||
|
||||
40
context-Small-code-cleanup.patch
Normal file
40
context-Small-code-cleanup.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 35bba25ca93701e330ea258f15f0310f11b27774 Mon Sep 17 00:00:00 2001
|
||||
From: Jens Georg <mail@jensge.org>
|
||||
Date: Wed, 19 May 2021 19:43:46 +0200
|
||||
Subject: [PATCH] context: Small code cleanup
|
||||
|
||||
---
|
||||
libgupnp/gupnp-context.c | 10 ++--------
|
||||
1 file changed, 2 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/libgupnp/gupnp-context.c b/libgupnp/gupnp-context.c
|
||||
index 460179e..58d3abf 100644
|
||||
--- a/libgupnp/gupnp-context.c
|
||||
+++ b/libgupnp/gupnp-context.c
|
||||
@@ -331,10 +331,7 @@ gupnp_context_dispose (GObject *object)
|
||||
context = GUPNP_CONTEXT (object);
|
||||
priv = gupnp_context_get_instance_private (context);
|
||||
|
||||
- if (priv->session) {
|
||||
- g_object_unref (priv->session);
|
||||
- priv->session = NULL;
|
||||
- }
|
||||
+ g_clear_object (&priv->session);
|
||||
|
||||
while (priv->host_path_datas) {
|
||||
HostPathData *data;
|
||||
@@ -344,10 +341,7 @@ gupnp_context_dispose (GObject *object)
|
||||
gupnp_context_unhost_path (context, data->server_path);
|
||||
}
|
||||
|
||||
- if (priv->server) {
|
||||
- g_object_unref (priv->server);
|
||||
- priv->server = NULL;
|
||||
- }
|
||||
+ g_clear_object (&priv->server);
|
||||
|
||||
/* Call super */
|
||||
object_class = G_OBJECT_CLASS (gupnp_context_parent_class);
|
||||
--
|
||||
2.27.0
|
||||
|
||||
39
gupnp.spec
39
gupnp.spec
@ -1,11 +1,17 @@
|
||||
Name: gupnp
|
||||
Version: 1.2.4
|
||||
Release: 1
|
||||
Release: 7
|
||||
Summary: UPnP devices & control points creation framework
|
||||
License: LGPLv2+
|
||||
URL: http://www.gupnp.org/
|
||||
Source0: http://download.gnome.org/sources/%{name}/1.2/%{name}-%{version}.tar.xz
|
||||
Patch0: CVE-2021-33516.patch
|
||||
Patch1: ServiceProxy-Remove-bogos-function-rename.patch
|
||||
Patch2: linux-cm-Fds-can-be-0.patch
|
||||
Patch3: service-action-Protect-against-unsent-message-use.patch
|
||||
Patch4: service-action-Do-not-leak-message-if-never-sent.patch
|
||||
Patch5: context-Small-code-cleanup.patch
|
||||
Patch6: service-proxy-Fix-introspection-annotation.patch
|
||||
|
||||
BuildRequires: gssdp-devel >= 1.2.3 gtk-doc gobject-introspection-devel >= 1.36
|
||||
BuildRequires: libsoup-devel libxml2-devel libuuid-devel vala meson
|
||||
@ -74,6 +80,37 @@ This package contains help file and developer documentation for gupnp.
|
||||
%{_mandir}/man1/gupnp-binding-tool-*
|
||||
|
||||
%changelog
|
||||
* Mon Dec 11 2023 fandehui <fandehui@xfusion.com> - 1.2.4-7
|
||||
- service-proxy: Fix introspection annotation
|
||||
|
||||
* Thu Nov 23 2023 fandehui <fandehui@xfusion.com> - 1.2.4-6
|
||||
- context: Small code cleanup
|
||||
|
||||
* Thu Nov 9 2023 fandehui <fandehui@xfusion.com> - 1.2.4-5
|
||||
- service-action: Do not leak message if never sent
|
||||
|
||||
* Fri Nov 3 2023 fandehui <fandehui@xfusion.com> - 1.2.4-4
|
||||
- service-action: Protect against unsent message use
|
||||
- If the action wasn't sent, do not crash
|
||||
|
||||
* Thu Oct 26 2023 fandehui <fandehui@xfusion.com> - 1.2.4-3
|
||||
- linux-cm: Fds can be 0
|
||||
|
||||
* Fri Oct 20 2023 fandehui <fandehui@xfusion.com> - 1.2.4-2
|
||||
- ServiceProxy: Remove bogos function rename
|
||||
|
||||
* Mon Jun 7 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 1.2.4-1
|
||||
- Upgrade to 1.2.4
|
||||
- Update Version, Release, Source0, BuildRequires
|
||||
- Delete sed operation which existed in this version
|
||||
- Add patch for fix CVE-2021-33516
|
||||
- Update stage 'prep', 'build', 'install', 'check', 'files'
|
||||
|
||||
* Fri Oct 25 2019 Alex Chao <zhaolei746@huawei.com> - 1.0.3-2
|
||||
- Package init
|
||||
* Fri Oct 20 2023 fandehui <fandehui@xfusion.com> - 1.2.4-2
|
||||
- ServiceProxy: Remove bogos function rename
|
||||
|
||||
* Mon Jun 7 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 1.2.4-1
|
||||
- Upgrade to 1.2.4
|
||||
- Update Version, Release, Source0, BuildRequires
|
||||
|
||||
57
linux-cm-Fds-can-be-0.patch
Normal file
57
linux-cm-Fds-can-be-0.patch
Normal file
@ -0,0 +1,57 @@
|
||||
From 1024bb948ae047282421dbac6f670317e4a17001 Mon Sep 17 00:00:00 2001
|
||||
From: Jens Georg <mail@jensge.org>
|
||||
Date: Mon, 10 May 2021 13:22:36 +0200
|
||||
Subject: [PATCH] linux-cm: Fds can be 0
|
||||
|
||||
---
|
||||
libgupnp/gupnp-linux-context-manager.c | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libgupnp/gupnp-linux-context-manager.c b/libgupnp/gupnp-linux-context-manager.c
|
||||
index e96ec66..03e951d 100644
|
||||
--- a/libgupnp/gupnp-linux-context-manager.c
|
||||
+++ b/libgupnp/gupnp-linux-context-manager.c
|
||||
@@ -943,8 +943,6 @@ create_ioctl_socket (GUPnPLinuxContextManager *self, GError **error)
|
||||
priv->fd = socket (AF_INET, SOCK_DGRAM, 0);
|
||||
|
||||
if (priv->fd < 0) {
|
||||
- priv->fd = 0;
|
||||
-
|
||||
g_set_error_literal (error,
|
||||
G_IO_ERROR,
|
||||
g_io_error_from_errno (errno),
|
||||
@@ -1045,6 +1043,7 @@ gupnp_linux_context_manager_init (GUPnPLinuxContextManager *self)
|
||||
GUPnPLinuxContextManagerPrivate *priv;
|
||||
|
||||
priv = gupnp_linux_context_manager_get_instance_private (self);
|
||||
+ priv->fd = -1;
|
||||
|
||||
priv->nl_seq = 0;
|
||||
|
||||
@@ -1087,8 +1086,10 @@ gupnp_linux_context_manager_constructed (GObject *object)
|
||||
NULL);
|
||||
cleanup:
|
||||
if (error) {
|
||||
- if (priv->fd > 0)
|
||||
+ if (priv->fd >= 0) {
|
||||
close (priv->fd);
|
||||
+ priv->fd = -1;
|
||||
+ }
|
||||
|
||||
g_warning ("Failed to setup Linux context manager: %s",
|
||||
error->message);
|
||||
@@ -1129,9 +1130,9 @@ gupnp_linux_context_manager_dispose (GObject *object)
|
||||
priv->netlink_socket = NULL;
|
||||
}
|
||||
|
||||
- if (priv->fd != 0) {
|
||||
+ if (priv->fd >= 0) {
|
||||
close (priv->fd);
|
||||
- priv->fd = 0;
|
||||
+ priv->fd = -1;
|
||||
}
|
||||
|
||||
if (priv->interfaces) {
|
||||
--
|
||||
2.27.0
|
||||
|
||||
40
service-action-Do-not-leak-message-if-never-sent.patch
Normal file
40
service-action-Do-not-leak-message-if-never-sent.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 0f59d903c9db01f7cbe6c2ebede0a570dd29f0f5 Mon Sep 17 00:00:00 2001
|
||||
From: Jens Georg <mail@jensge.org>
|
||||
Date: Wed, 19 May 2021 19:42:59 +0200
|
||||
Subject: [PATCH] service-action: Do not leak message if never sent
|
||||
|
||||
---
|
||||
libgupnp/gupnp-service-proxy-action.c | 4 ++++
|
||||
libgupnp/gupnp-service-proxy.c | 1 +
|
||||
2 files changed, 5 insertions(+)
|
||||
|
||||
diff --git a/libgupnp/gupnp-service-proxy-action.c b/libgupnp/gupnp-service-proxy-action.c
|
||||
index 2fd10d5..da41d91 100644
|
||||
--- a/libgupnp/gupnp-service-proxy-action.c
|
||||
+++ b/libgupnp/gupnp-service-proxy-action.c
|
||||
@@ -230,6 +230,10 @@ action_dispose (GUPnPServiceProxyAction *action)
|
||||
g_clear_object (&action->cancellable);
|
||||
g_clear_error (&action->error);
|
||||
g_clear_object (&action->msg);
|
||||
+ if (action->msg_str != NULL) {
|
||||
+ g_string_free (action->msg_str, TRUE);
|
||||
+ action->msg_str = NULL;
|
||||
+ }
|
||||
g_free (action->name);
|
||||
}
|
||||
|
||||
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
|
||||
index cec7c8a..0201638 100644
|
||||
--- a/libgupnp/gupnp-service-proxy.c
|
||||
+++ b/libgupnp/gupnp-service-proxy.c
|
||||
@@ -724,6 +724,7 @@ prepare_action_msg (GUPnPServiceProxy *proxy,
|
||||
ret->msg_str->len);
|
||||
|
||||
g_string_free (ret->msg_str, FALSE);
|
||||
+ ret->msg_str = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
2.27.0
|
||||
|
||||
33
service-action-Protect-against-unsent-message-use.patch
Normal file
33
service-action-Protect-against-unsent-message-use.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From 8a349541f10b774ac8128bfb0e25ddbb405e6033 Mon Sep 17 00:00:00 2001
|
||||
From: Jens Georg <mail@jensge.org>
|
||||
Date: Wed, 19 May 2021 19:40:41 +0200
|
||||
Subject: [PATCH] service-action: Protect against unsent message use
|
||||
|
||||
If the action wasn't sent, do not crash
|
||||
---
|
||||
libgupnp/gupnp-service-proxy-action.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/libgupnp/gupnp-service-proxy-action.c b/libgupnp/gupnp-service-proxy-action.c
|
||||
index 3b3a7c1..2fd10d5 100644
|
||||
--- a/libgupnp/gupnp-service-proxy-action.c
|
||||
+++ b/libgupnp/gupnp-service-proxy-action.c
|
||||
@@ -61,6 +61,15 @@ check_action_response (G_GNUC_UNUSED GUPnPServiceProxy *proxy,
|
||||
xmlDoc *response;
|
||||
int code;
|
||||
|
||||
+ if (action->msg == NULL) {
|
||||
+ g_set_error (error,
|
||||
+ GUPNP_SERVER_ERROR,
|
||||
+ GUPNP_SERVER_ERROR_INVALID_RESPONSE,
|
||||
+ "No message, the action was not sent?");
|
||||
+
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
/* Check for errors */
|
||||
switch (action->msg->status_code) {
|
||||
case SOUP_STATUS_OK:
|
||||
--
|
||||
2.27.0
|
||||
|
||||
56
service-proxy-Fix-introspection-annotation.patch
Normal file
56
service-proxy-Fix-introspection-annotation.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From 0cedf004b4730da8d8533ae6a38efa97553430f1 Mon Sep 17 00:00:00 2001
|
||||
From: Jens Georg <mail@jensge.org>
|
||||
Date: Thu, 20 May 2021 12:28:51 +0200
|
||||
Subject: [PATCH] service-proxy: Fix introspection annotation
|
||||
|
||||
call_action will not add a reference to action but just pass it through
|
||||
so it is really transfer none
|
||||
|
||||
call_action_finish does not add a reference to the returned action, so
|
||||
it is also transfer none for the return value
|
||||
---
|
||||
libgupnp/gupnp-service-proxy.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
|
||||
index 56bb438..6e09456 100644
|
||||
--- a/libgupnp/gupnp-service-proxy.c
|
||||
+++ b/libgupnp/gupnp-service-proxy.c
|
||||
@@ -2066,7 +2066,7 @@ gupnp_service_proxy_get_subscribed (GUPnPServiceProxy *proxy)
|
||||
/**
|
||||
* gupnp_service_proxy_call_action_async:
|
||||
* @proxy: (transfer none): A #GUPnPServiceProxy
|
||||
- * @action: An action
|
||||
+ * @action: (transfer none): A #GUPnPServiceProxyAction to call
|
||||
* @cancellable: (allow-none): A #GCancellable which can be used to cancel the
|
||||
* current action call
|
||||
* @callback: (scope async): A #GAsyncReadyCallback to call when the action is
|
||||
@@ -2115,7 +2115,7 @@ gupnp_service_proxy_call_action_async (GUPnPServiceProxy *proxy,
|
||||
* Finish an asynchronous call initiated with
|
||||
* gupnp_service_proxy_call_action_async().
|
||||
*
|
||||
- * Returns: %NULL, if the call had an error, the action otherwise.
|
||||
+ * Returns: (nullable) (transfer none): %NULL, if the call had an error, the action otherwise.
|
||||
*/
|
||||
GUPnPServiceProxyAction *
|
||||
gupnp_service_proxy_call_action_finish (GUPnPServiceProxy *proxy,
|
||||
@@ -2130,14 +2130,14 @@ gupnp_service_proxy_call_action_finish (GUPnPServiceProxy *proxy,
|
||||
/**
|
||||
* gupnp_service_proxy_call_action:
|
||||
* @proxy: (transfer none): A #GUPnPServiceProxy
|
||||
- * @action: An action
|
||||
+ * @action: (transfer none): An action
|
||||
* @cancellable: (allow-none): A #GCancellable which can be used to cancel the
|
||||
* current action call
|
||||
* @error: (allow-none): Return location for a #GError, or %NULL.
|
||||
*
|
||||
* Synchronously call the @action on the remote UPnP service.
|
||||
*
|
||||
- * Returns: %NULL on error, @action if successful.
|
||||
+ * Returns: (nullable)(transfer none): %NULL on error, @action if successful.
|
||||
*/
|
||||
GUPnPServiceProxyAction *
|
||||
gupnp_service_proxy_call_action (GUPnPServiceProxy *proxy,
|
||||
--
|
||||
2.27.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user