[gssdp] tools: Fix possible NULL pointer dereference



commit 7d1365c7c9a4348bbceeaabdcdd02c26bf211ebf
Author: Thomas Klausner <tk giga or at>
Date:   Sat Jan 17 09:34:00 2015 +0000

    tools: Fix possible NULL pointer dereference
    
    https://bugzilla.gnome.org/show_bug.cgi?id=743070

 tools/gssdp-device-sniffer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tools/gssdp-device-sniffer.c b/tools/gssdp-device-sniffer.c
index 0e4bd06..2fd98b9 100644
--- a/tools/gssdp-device-sniffer.c
+++ b/tools/gssdp-device-sniffer.c
@@ -330,7 +330,7 @@ resource_available_cb (G_GNUC_UNUSED GSSDPResourceBrowser *resource_browser,
 
         uuid = usn_tokens[0] + 5; /* skip the prefix 'uuid:' */
 
-        if (usn_tokens[1]) {
+        if (usn_tokens[1] && strlen(usn_tokens[1]) != 0) {
                 char **urn_tokens;
 
                 urn_tokens = g_strsplit (usn_tokens[1], ":device:", -1);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]