[gupnp] ControlPoint: Don't load description on url error
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp] ControlPoint: Don't load description on url error
- Date: Sun, 9 Jan 2022 15:21:24 +0000 (UTC)
commit c7d3e422c8547d39e0c08ae4ce95b55d3109a646
Author: Jens Georg <mail jensge org>
Date: Sun Jan 9 16:05:36 2022 +0100
ControlPoint: Don't load description on url error
If the URL rewrite fails, don't try to load the description file
libgupnp/gupnp-control-point.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/libgupnp/gupnp-control-point.c b/libgupnp/gupnp-control-point.c
index 71704b0..c6e12af 100644
--- a/libgupnp/gupnp-control-point.c
+++ b/libgupnp/gupnp-control-point.c
@@ -724,6 +724,15 @@ load_description (GUPnPControlPoint *control_point,
data->timeout = timeout;
local_description = gupnp_context_rewrite_uri (context,
description_url);
+ if (local_description == NULL) {
+ g_warning ("Invalid description URL: %s",
+ description_url);
+
+ g_slice_free (GetDescriptionURLData, data);
+
+ return;
+ }
+
data->message = soup_message_new (SOUP_METHOD_GET,
local_description);
g_free (local_description);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]