summaryrefslogtreecommitdiff
path: root/net/gupnp/patches/patch-ab
blob: 1a99688db88bb6613f1dec1848cd7cc972a3d289 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$NetBSD: patch-ab,v 1.2 2015/01/20 10:12:25 wiz Exp $

More defensive programming.
https://bugzilla.gnome.org/show_bug.cgi?id=743233

--- libgupnp/gupnp-control-point.c.orig	2009-04-30 13:54:20.000000000 +0200
+++ libgupnp/gupnp-control-point.c
@@ -572,7 +572,7 @@ parse_usn (const char *usn,
         /* Count elements */
         count = g_strv_length (bits);
 
-        if (count == 1) {
+        if (count == 1 || (count == 2 && strlen(bits[1]) == 0)) {
                 /* uuid:device-UUID */
 
                 *udn = bits[0];