!29 service-action: Do not leak message if never sent
From: @linker99 Reviewed-by: @Charlie_li Signed-off-by: @Charlie_li
This commit is contained in:
commit
c67fd873bf
@ -1,6 +1,6 @@
|
||||
Name: gupnp
|
||||
Version: 1.2.4
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: UPnP devices & control points creation framework
|
||||
License: LGPLv2+
|
||||
URL: http://www.gupnp.org/
|
||||
@ -9,6 +9,7 @@ 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
|
||||
|
||||
BuildRequires: gssdp-devel >= 1.2.3 gtk-doc gobject-introspection-devel >= 1.36
|
||||
BuildRequires: libsoup-devel libxml2-devel libuuid-devel vala meson
|
||||
@ -77,6 +78,9 @@ This package contains help file and developer documentation for gupnp.
|
||||
%{_mandir}/man1/gupnp-binding-tool-*
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user